-
Couldn't load subscription status.
- Fork 31k
Closed
Description
🐛 Bug
Information
I'm trying to fine-tune BERT model using run_language_modeling.py.
Language I am using the model on is Persian:
The problem arises when using:
- the official example scripts: (give details below)
- my own modified scripts: (give details below)
The tasks I am working on is:
- an official GLUE/SQUaD task: (give the name)
- my own task or dataset: (give details below)
But according to this issue there is a bug in torch.utils.data.distributed.DistributedSampler so that during different epochs shuffling operation doesn't work properly(it's not working).
To solve this problem: according to pytorch official example here, we should add train_sampler.set_epoch(epoch) before each new epoch at this line
To reproduce
Steps to reproduce the behavior:
- compare batches between different epoch like mentioned issue
Expected behavior
Environment info
transformersversion: transformers==2.8.0- Platform: Ubuntu 18.04
- Python version: 3.7
- PyTorch version (GPU?): torch==1.4.0 (Yes)
- Tensorflow version (GPU?): tensorflow-gpu==2.1.0 (Yes)
- Using GPU in script?: Yes
- Using distributed or parallel set-up in script?: distributed
amir-vaheb
Metadata
Metadata
Assignees
Labels
No labels