Loading fairseq/data/backtranslation_dataset.py +1 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ class BacktranslationDataset(FairseqDataset): remove_eos_at_src=False, generator_class=sequence_generator.SequenceGenerator, cuda=True, **kwargs, **kwargs ): """ Sets up a backtranslation dataset which takes a tgt batch, generates Loading fairseq/data/noising.py +1 −1 Original line number Diff line number Diff line Loading @@ -242,7 +242,7 @@ class NoisingDataset(torch.utils.data.Dataset): seed, noiser=None, noising_class=UnsupervisedMTNoising, **kwargs, **kwargs ): """ Sets up a noising dataset which takes a src batch, generates Loading preprocess.py +1 −1 Original line number Diff line number Diff line Loading @@ -120,7 +120,7 @@ def main(args): def file_name(prefix, lang): fname = prefix if lang is not None: fname += f".{lang}" fname += ".{lang}".format(lang=lang) return fname def dest_path(prefix, lang): Loading tests/test_noising.py +2 −2 Original line number Diff line number Diff line Loading @@ -146,8 +146,8 @@ class TestDataNoising(unittest.TestCase): x[x_len[i] - 1][i], eos, ( "Expected eos (token id {eos}) at the end of sentence {i} but " "got {other} instead" "Expected eos (token id {eos}) at the end of sentence {i} " "but got {other} instead" ).format(i=i, eos=eos, other=x[i][-1]), ) Loading Loading
fairseq/data/backtranslation_dataset.py +1 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ class BacktranslationDataset(FairseqDataset): remove_eos_at_src=False, generator_class=sequence_generator.SequenceGenerator, cuda=True, **kwargs, **kwargs ): """ Sets up a backtranslation dataset which takes a tgt batch, generates Loading
fairseq/data/noising.py +1 −1 Original line number Diff line number Diff line Loading @@ -242,7 +242,7 @@ class NoisingDataset(torch.utils.data.Dataset): seed, noiser=None, noising_class=UnsupervisedMTNoising, **kwargs, **kwargs ): """ Sets up a noising dataset which takes a src batch, generates Loading
preprocess.py +1 −1 Original line number Diff line number Diff line Loading @@ -120,7 +120,7 @@ def main(args): def file_name(prefix, lang): fname = prefix if lang is not None: fname += f".{lang}" fname += ".{lang}".format(lang=lang) return fname def dest_path(prefix, lang): Loading
tests/test_noising.py +2 −2 Original line number Diff line number Diff line Loading @@ -146,8 +146,8 @@ class TestDataNoising(unittest.TestCase): x[x_len[i] - 1][i], eos, ( "Expected eos (token id {eos}) at the end of sentence {i} but " "got {other} instead" "Expected eos (token id {eos}) at the end of sentence {i} " "but got {other} instead" ).format(i=i, eos=eos, other=x[i][-1]), ) Loading