Fix load_dataset signature
Summary:
Fix for
Tested with MaskedLMTask.
Pull Request resolved:
MODIFY
fairseq/tasks/masked_lm.py
fairseq/tasks/masked_lm.py
@@ -71,7 +71,7 @@ class MaskedLMTask(FairseqTask):
print('| dictionary: {} types'.format(len(dictionary)))
return cls(args, dictionary)
- def load_dataset(self, split, epoch=0, combine=False):
+ def load_dataset(self, split, epoch=0, combine=False, **kwargs):
"""Load a given dataset split.
Args:

MODIFY
fairseq/tasks/multilingual_masked_lm.py
fairseq/tasks/multilingual_masked_lm.py
@@ -110,7 +110,7 @@ class MultiLingualMaskedLMTask(FairseqTask):
smoothed_prob = smoothed_prob / smoothed_prob.sum()
return smoothed_prob
- def load_dataset(self, split, epoch=0, combine=False):
+ def load_dataset(self, split, epoch=0, combine=False, **kwargs):
"""Load a given dataset split.
Args:

Fix load_dataset signature (#1281)

Summary:
Fix for https://github.com/pytorch/fairseq/issues/1240
Tested with MaskedLMTask.
Pull Request resolved: https://github.com/pytorch/fairseq/pull/1281

Differential Revision: D18051472

fbshipit-source-id: 0aeff60c71489655f5e621349f780ba9cd8c027a