mirror of
https://github.com/facebookresearch/fairseq.git
synced 2024-09-11 17:25:31 +03:00
Summary: * Now that we have `FairseqIncrementalState`, we can move `get_incremental_state` and `set_incremental_state` as methods in that class, instead of having the helper functions in `utils.py`. I think this will eventually help with type checking too. * The incremental ID logic was overly complicated, we can just use `uuid` to generate a unique ID for every instance. * Add missing `with_incremental_state` to light/dynamic conv modules. * Add additional unit test: `test_incremental_state_multihead_attention` Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/1005 Test Plan: * unit tests Also confirmed this matches master: ``` $ python generate.py ~/data/data-bin/wmt16_en_de_bpe32k --path /checkpoint/myleott/s3/models/wmt16.en-de.joined-dict.transformer/model.pt --beam 4 --lenpen 0.6 --remove-bpe --quiet (...) 2020-01-22 09:53:38 | INFO | fairseq_cli.generate | Generate test with beam=4: BLEU4 = 29.28, 60.8/35.1/22.8/15.3 (BP=0.997, ratio=0.997, syslen=62859, reflen=63078) ``` Reviewed By: cndn Differential Revision: D19517908 Pulled By: myleott fbshipit-source-id: a406490e342d0d30a9231bf823d3350999bda4c0 |
||
---|---|---|
.. | ||
speech_recognition | ||
__init__.py | ||
test_average_checkpoints.py | ||
test_backtranslation_dataset.py | ||
test_binaries.py | ||
test_bmuf.py | ||
test_character_token_embedder.py | ||
test_concat_dataset.py | ||
test_convtbc.py | ||
test_dictionary.py | ||
test_export.py | ||
test_file_io.py | ||
test_iterators.py | ||
test_label_smoothing.py | ||
test_memory_efficient_fp16.py | ||
test_metrics.py | ||
test_multi_corpus_sampled_dataset.py | ||
test_multihead_attention.py | ||
test_noising.py | ||
test_reproducibility.py | ||
test_resampling_dataset.py | ||
test_sequence_generator.py | ||
test_sequence_scorer.py | ||
test_sparse_multihead_attention.py | ||
test_token_block_dataset.py | ||
test_train.py | ||
test_utils.py | ||
utils.py |