From 52e1067b7650d9adb2bbf61b2c5c0c53c09b5a1e Mon Sep 17 00:00:00 2001 From: Keenan Thompson Date: Thu, 25 Mar 2021 11:55:50 +0800 Subject: [PATCH 1/3] Added requirements.txt with torch 1.1.0; Updated README with reference to requirements.txt and added Known Issues section --- README.md | 16 ++++++++++++++++ requirements.txt | 23 +++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 requirements.txt diff --git a/README.md b/README.md index 504f4798..85e52d1c 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,12 @@ Results on CNN/Dailymail (25/3/2019): **Package Requirements**: pytorch pytorch_pretrained_bert tensorboardX multiprocess pyrouge +We have included a requirements.txt file to help you get started. + +``` +pip install -r requirements.txt +``` + Some codes are borrowed from ONMT(https://github.com/OpenNMT/OpenNMT-py) ## Data Preparation For CNN/Dailymail @@ -97,4 +103,14 @@ python train.py -mode validate -bert_data_path ../bert_data/cnndm -model_path MO * `MODEL_PATH` is the directory of saved checkpoints * `RESULT_PATH` is where you want to put decoded summaries (default `../results/cnndm`) +## Known Issues + +When running the code with higher versions of pytorch, you may encounter the following error. + +``` +Subtraction, the - operator, with a bool tensor is not supported +``` + +For this reason we have specified version 1.1.0 in the requirements.txt file. + diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..45c007c8 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,23 @@ +boto3==1.16.45 +botocore==1.19.45 +certifi==2020.12.5 +chardet==4.0.0 +dataclasses==0.8 +dill==0.3.3 +idna==2.10 +jmespath==0.10.0 +multiprocess==0.70.11.1 +numpy==1.19.4 +protobuf==3.14.0 +pyrouge==0.1.3 +python-dateutil==2.8.1 +pytorch-pretrained-bert==0.6.2 +regex==2020.11.13 +requests==2.25.1 +s3transfer==0.3.3 +six==1.15.0 +tensorboardX==2.1 +torch==1.1.0 +tqdm==4.55.0 +typing-extensions==3.7.4.3 +urllib3==1.26.2 \ No newline at end of file From a751ff3ad6afca5a9ee14d4b5ad2ec316cea6756 Mon Sep 17 00:00:00 2001 From: Keenan Thompson Date: Thu, 25 Mar 2021 12:13:19 +0800 Subject: [PATCH 2/3] Capitalized PyTorch --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 85e52d1c..f6630039 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ python train.py -mode validate -bert_data_path ../bert_data/cnndm -model_path MO ## Known Issues -When running the code with higher versions of pytorch, you may encounter the following error. +When running the code with higher versions of PyTorch, you may encounter the following error. ``` Subtraction, the - operator, with a bool tensor is not supported From f75db25cd3857c18840b024c1f1bb5d87edf42f1 Mon Sep 17 00:00:00 2001 From: Keenan Thompson Date: Sun, 28 Mar 2021 14:17:00 +0800 Subject: [PATCH 3/3] Added invalid device ordinal in known issues --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index f6630039..5d0fe0b3 100644 --- a/README.md +++ b/README.md @@ -113,4 +113,11 @@ Subtraction, the - operator, with a bool tensor is not supported For this reason we have specified version 1.1.0 in the requirements.txt file. +When running one of the training commands, the program may crash with the following message. + +``` +invalid device ordinal +``` + +This may be because you are running on a system that only has access to a single GPU. If this is the case, running the commands with the following flags ``-visible_gpus 0 -gpu_ranks 0 -world_size 1`` should work.