Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README with instructions for multi-gpu. #122

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
15 changes: 14 additions & 1 deletion MASS-summarization/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,26 @@ fairseq-generate $DATADIR --path $MODEL \

## Other questions
1. Q: I have met error like `ModuleNotFouldError: No module named 'mass'` in multi-GPUs or multi-nodes, how to solve it?
A: It seems like a bug in python `multiprocessing/spawn.py`. A direct solution is to move these three files to its corresponding folder in the fairseq. For example:
A: It seems like a bug in python `multiprocessing/spawn.py`. A direct solution is to move these three files to its corresponding folder in the fairseq. For example:
```
# Make sure you clone the release corresponding to MASS required version.
git clone https://github.com/pytorch/fairseq.git --branch v0.8.0.
mv bert_dictionary.py fairseq/fairseq/data/
mv masked_dataset.py fairseq/fairseq/data/
mv learned_positional_embedding.py fairseq/fairseq/modules/

# Make sure those new imports are inserted after the existing ones in __init__.py
modify fairseq/fairseq/data/__init__.py to import the above files.
```

Remember to modify imports in `s2s_model.py, masked_s2s.py, s2s_model.py` to import from `fairseq.data`.
For example in `translation.py`:
```
- from .bert_dictionary import BertDictionary
+ from fairseq.data.bert_dictionary import BertDictionary
```

In order to apply those changes to `fairseq` source you will need to clone. Make sure you clone the tag corresponding to the version required by `MASS`, i.e: `git clone https://github.com/pytorch/fairseq.git --branch v0.8.0`.

<!---
## Training Details
Expand Down