1. 29 May, 2019 4 commits
  2. 28 May, 2019 1 commit
  3. 24 May, 2019 2 commits
  4. 23 May, 2019 3 commits
    • Jason Fried's avatar
      collections.abc python 3.8 · 6b3a516f
      Jason Fried authored
      Summary:
      In python 3.7 collections.abc warns when importing abc classes from `collections`
      In 3.8 this will not work at all.
      
      This changes all code using abc's from collections to attempt to import from `collections.abc`
      
      I am not fixing existing lint's don't ask, if `arc lint` auto-fixed I accepted, except for spelling in code.
      
      Reviewed By: lisroach
      
      Differential Revision: D15461049
      
      fbshipit-source-id: ac2bf2ec8cffacd8ba5572882b0832bbf99a1646
      6b3a516f
    • Myle Ott's avatar
      Fix gating for find_unused_parameters · 128f4bea
      Myle Ott authored
      Summary: Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/600
      
      Differential Revision: D15469322
      
      Pulled By: myleott
      
      fbshipit-source-id: fdefa8efbb10e48b2a04a6bc10404fd2f3f21ecf
      128f4bea
    • Kritika Singh's avatar
      Allow unused params in distributed training · 72a5487c
      Kritika Singh authored
      Summary:
      Context from https://fb.workplace.com/groups/1405155842844877/permalink/2785095451517569/:
      
      I am adding a model to pyspeech (formerly fairspeq) with the following `forward`:
      ```
      def forward(self, src_tokens, src_lengths, prev_output_tokens, name):
          encoder_out = self.encoder(src_tokens, src_lengths)
          if name == Dataset.d1:
              decoder_out = self.decoder1(prev_output_tokens, encoder_out)
          elif name == Dataset.d2:
              decoder_out = self.decoder2(encoder_out)
          return decoder_out
      ```
      When I run distributed training on this model, I get the following error:
      
      ```
      RuntimeError: Expected to have finished reduction in the prior iteration before starting a
      new one. This error indicates that your module has parameters that were not used in
      producing loss. You can enable unused parameter detection by (1) passing the keyword
      argument `find_unused_parameters=True` to `torch.nn.parallel.DistributedDataParallel`; (2)
      making sure all `forward` function outputs participate in calculating loss. If you already have
      done the above two steps, then the distributed data parallel module wasn't able to locate the
      output tensors in the return value of your module's `forward` function. Please include the loss
      function and the structure of the return value of `forward` of your module when reporting this
      issue (e.g. list, dict, iterable). (prepare_for_backward at
      caffe2/torch/csrc/distributed/c10d/reducer.cpp:410)
      ```
      
      The recommended fix is to pass find_unused_parameters=True to DistributedDataParallel's initialization
      
      Reviewed By: myleott
      
      Differential Revision: D15439726
      
      fbshipit-source-id: 7fd80d4a3f49ac90182dec723b49b14e6689406a
      72a5487c
  5. 22 May, 2019 2 commits
    • Matt Le's avatar
      Fix semisupervised translation · c11aaf14
      Matt Le authored
      Summary: Fixes semisupervised translation task to deal with change in order of data loading and model creation (D15428242).  When we build the model, we create the backtranslation function, which we can then pass in to the constructor of BacktranslationDataset
      
      Reviewed By: myleott
      
      Differential Revision: D15455420
      
      fbshipit-source-id: 95101ca92f8af33702be3416147edd98da135a20
      c11aaf14
    • zhiqiang's avatar
      Remove duplicate code (#754) · 886ef6bc
      zhiqiang authored
      Summary:
      Remove duplicate definition of PositionalEmbedding in `lightconv.py`
      Pull Request resolved: https://github.com/pytorch/fairseq/pull/754
      
      Differential Revision: D15451443
      
      Pulled By: myleott
      
      fbshipit-source-id: a3d82ab2c1335d66be3c5d67a07893162d138c7a
      886ef6bc
  6. 21 May, 2019 3 commits
  7. 20 May, 2019 4 commits
  8. 19 May, 2019 1 commit
  9. 17 May, 2019 2 commits
  10. 16 May, 2019 5 commits
  11. 15 May, 2019 7 commits
  12. 14 May, 2019 3 commits
    • Myle Ott's avatar
      rm default_key from MultiCorpusSampledDataset · 7432130e
      Myle Ott authored
      Summary: Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/575
      
      Differential Revision: D15318004
      
      Pulled By: myleott
      
      fbshipit-source-id: ad918d71b1bd8074decf5ec3463dd9bc9487bbe9
      7432130e
    • Nayan Singhal's avatar
      Alignment Training task using minibatch · 2c278ff0
      Nayan Singhal authored
      Summary:
      1. Define a EpochMinibatchIterator which extends the EpochBatchIterator. It has same functionality as EpochBatchIterator except two major changes: use static batching and use MiniBatchIterator for getting the indices.
      
      2. SplitSeqCollater is used instead of Seq2SeqCollater.
      3. LSTM_subsample started storing the previous states and reset it once the sample is over.
      
      Reviewed By: jay-mahadeokar
      
      Differential Revision: D15209023
      
      fbshipit-source-id: 900b8bd1f25159ffc77f8106e26729a3e7422a1f
      2c278ff0
    • Dmytro Okhonko's avatar
      Move save/load checkpoint functions to utils · cd1e5c09
      Dmytro Okhonko authored
      Summary:
      Move `load_checkpoint`, `save_checkpoint` and `reload_train` from train.py to checkpoint_utils.py
      Move `get_perplexity` from train.py to utils.py.
      This will make train.py lighter and allow us to reuse all this utils functionality when fairseq is used as external library.
      
      Reviewed By: myleott
      
      Differential Revision: D15289607
      
      fbshipit-source-id: 4b7c95225ac22e402bcda3497811361809110df1
      cd1e5c09
  13. 13 May, 2019 3 commits