-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from rloganiv/beamsum
Beamsum
- Loading branch information
Showing
37 changed files
with
2,039 additions
and
653 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,28 @@ | ||
FROM nvidia/cuda:10.0-cudnn7-devel-ubuntu16.04 | ||
RUN echo "deb-src http://archive.ubuntu.com/ubuntu/ xenial main" | tee -a /etc/apt/sources.list | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
cmake \ | ||
git \ | ||
curl \ | ||
vim \ | ||
ca-certificates \ | ||
libjpeg-dev \ | ||
libpng-dev &&\ | ||
rm -rf /var/lib/apy/lists/* | ||
# FROM python:3.6.8-jessie | ||
FROM pytorch/pytorch:1.1.0-cuda10.0-cudnn7.5-runtime | ||
ENV LC_ALL=C.UTF-8 | ||
ENV LANG=C.UTF-8 | ||
|
||
RUN curl -o ~/miniconda.sh -O https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && \ | ||
chmod +x ~/miniconda.sh && \ | ||
~/miniconda.sh -b -p /opt/conda && \ | ||
rm ~/miniconda.sh && \ | ||
/opt/conda/bin/conda install -y python=$PYTHON_VERSION numpy pyyaml scipy ipython mkl mkl-include cython typing && \ | ||
/opt/conda/bin/conda install -y -c pytorch magma-cuda100 && \ | ||
/opt/conda/bin/conda clean -ya | ||
ENV PATH /opt/conda/bin:$PATH | ||
ENV PATH /usr/local/nvidia/bin/:$PATH | ||
ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64 | ||
|
||
# Tell nvidia-docker the driver spec that we need as well as to | ||
# use all available devices, which are mounted at /usr/local/nvidia. | ||
# The LABEL supports an older version of nvidia-docker, the env | ||
# variables a newer one. | ||
ENV NVIDIA_VISIBLE_DEVICES all | ||
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility | ||
LABEL com.nvidia.volumes.needed="nvidia_driver" | ||
|
||
WORKDIR /workspace | ||
RUN chmod -R a+w /workspace | ||
|
||
COPY requirements.txt . | ||
RUN pip install --upgrade pip | ||
RUN pip install -r requirements.txt | ||
|
||
COPY experiments/ experiments/ | ||
COPY kglm/ kglm/ | ||
COPY .pylintrc .pylintrc | ||
COPY pytest.ini pytest.ini | ||
COPY README.md README.md | ||
COPY requirements.txt . | ||
|
||
RUN pip install -r requirements.txt | ||
RUN chmod -R a+w /workspace | ||
COPY kglm/ kglm/ | ||
COPY experiments/ experiments/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"vocabulary": { | ||
"type": "extended", | ||
"max_vocab_size": {"tokens": 10000} | ||
}, | ||
"datasets_for_vocab_creation": ["train"], | ||
"dataset_reader": { | ||
"type": "conll2012_jsonl", | ||
"token_indexers": { | ||
"tokens": { | ||
"type": "single_id", | ||
"lowercase_tokens": false | ||
} | ||
} | ||
}, | ||
"train_data_path": "data/conll-2012/processed/train.jsonl", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{ | ||
"vocabulary": { | ||
"type": "extended", | ||
"extend": false, | ||
"directory_path": "/kermit/rlogan/entity-nlm/data/vocabulary" | ||
}, | ||
"dataset_reader": { | ||
"type": "conll2012_jsonl", | ||
}, | ||
"train_data_path": "/kermit/rlogan/entity-nlm/data/conll-2012/processed/train.jsonl", | ||
"validation_data_path": "/kermit/rlogan/entity-nlm/data/conll-2012/processed/dev.jsonl", | ||
"model": { | ||
"type": "entitydisc", | ||
"text_field_embedder": { | ||
"token_embedders": { | ||
"tokens": { | ||
"type": "embedding", | ||
"embedding_dim": 256, | ||
"trainable": true | ||
}, | ||
}, | ||
}, | ||
"embedding_dim": 256, | ||
"hidden_size": 256, | ||
"num_layers": 1, | ||
"max_mention_length": 100, | ||
"max_embeddings": 100, | ||
"dropout_rate": 0.4, | ||
"variational_dropout_rate": 0.1 | ||
}, | ||
"iterator": { | ||
"type": "fancy", | ||
"batch_size": 343, | ||
"split_size": 30, | ||
"splitting_keys": [ | ||
"source", | ||
"entity_types", | ||
"entity_ids", | ||
"mention_lengths" | ||
], | ||
}, | ||
"validation_iterator": { | ||
"type": "fancy", | ||
"batch_size": 343, | ||
"split_size": 128, | ||
"splitting_keys": [ | ||
"source", | ||
"entity_types", | ||
"entity_ids", | ||
"mention_lengths" | ||
], | ||
"truncate": false | ||
}, | ||
"trainer": { | ||
"type": "lm", | ||
"num_epochs": 400, | ||
"cuda_device": 0, | ||
"optimizer": { | ||
"type": "adam", | ||
"lr": 1e-3 | ||
}, | ||
"validation_metric": "+eid_acc" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,7 +53,7 @@ | |
"num_epochs": 750, | ||
"optimizer": { | ||
"type": "adam", | ||
"lr": 0.0003 | ||
"lr": 0.0001 | ||
} | ||
}, | ||
"vocabulary": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.