Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.

23 changes: 23 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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