diff --git a/README.md b/README.md index 504f4798..5d0fe0b3 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,21 @@ 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. + +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. 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