fairseq/tests
Myle Ott 803c0a6d11 Update iterators to support counting, rename CountingIterator.count -> n and add tests (#1166)
Summary:
A few changes here:
- update GroupedIterator and ShardedIterator to support counting. This will be useful on TPUs, since the TPU dataloading threads may advance faster than we can process them.
- add tests for the above
- in CountingIterator, rename `count` -> `n`. This is needed because `count` is overloaded for iterables (e.g., `list` defines a different `count` method, which is actually a search function).
- in CountingIterator, rename `override_len` -> `total` to be more consistent with other iterators (e.g., tqdm). This functionality was unused previously (it's only needed for TPUs), so the rename is easy.
Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/1166

Reviewed By: ngoyal2707

Differential Revision: D21373525

Pulled By: myleott

fbshipit-source-id: 102f3d50ed1a5163a7d1216ca5a179564a05dfe4
2020-05-14 13:57:04 -07:00
..
speech_recognition refactor namespaces in criterion interface (#1729) 2020-03-04 16:43:59 -08:00
__init__.py fairseq-py goes distributed (#106) 2018-02-27 17:09:42 -05:00
test_average_checkpoints.py Small fixes 2019-08-19 15:08:25 -07:00
test_backtranslation_dataset.py Deprecate the SequenceGenerator with the Scripted vision (#1120) 2020-04-07 13:28:30 -07:00
test_binaries.py Fix eval_lm (fixes #2083) and a few other small things (#2100) 2020-05-11 12:43:14 -07:00
test_bmuf.py Fix BMUF using 1 GPU 2020-04-16 11:25:35 -07:00
test_character_token_embedder.py Relicense fairseq under MIT license (#786) 2019-07-30 07:48:23 -07:00
test_concat_dataset.py Relicense fairseq under MIT license (#786) 2019-07-30 07:48:23 -07:00
test_convtbc.py Relicense fairseq under MIT license (#786) 2019-07-30 07:48:23 -07:00
test_dictionary.py Allow dictionaries to overwrite entries with #fairseq:overwrite comment (#1073) 2020-03-08 06:52:00 -07:00
test_export.py Bugfixes (#1159) 2020-05-01 04:09:37 -07:00
test_file_io.py Added unit test for PathManager file io (with or without fvcore). 2019-12-09 14:19:51 -08:00
test_iterators.py Update iterators to support counting, rename CountingIterator.count -> n and add tests (#1166) 2020-05-14 13:57:04 -07:00
test_label_smoothing.py refactor namespaces in criterion interface (#1729) 2020-03-04 16:43:59 -08:00
test_lstm_jitable.py Various fixes (#2127) 2020-05-14 10:23:34 -07:00
test_memory_efficient_fp16.py Clean up tests 2020-01-22 11:29:20 -08:00
test_metrics.py Fix logging of training sets (fixes #1632) (#1634) 2020-01-20 16:34:33 -08:00
test_multi_corpus_sampled_dataset.py Relicense fairseq under MIT license (#786) 2019-07-30 07:48:23 -07:00
test_multihead_attention.py Fixing key padding mask during transformer generation 2019-11-05 06:50:53 -08:00
test_noising.py Relicense fairseq under MIT license (#786) 2019-07-30 07:48:23 -07:00
test_reproducibility.py Fix validation happening twice at the end of epoch (#1934) 2020-04-03 16:38:39 -07:00
test_resampling_dataset.py Add dataset class for weighted sampling with replacement. (#861) 2019-09-19 10:36:00 -07:00
test_sequence_generator.py Pass all net_inputs in SequenceGenerator (#2090) 2020-05-10 06:13:06 -07:00
test_sequence_scorer.py Relicense fairseq under MIT license (#786) 2019-07-30 07:48:23 -07:00
test_sparse_multihead_attention.py Relicense fairseq under MIT license (#786) 2019-07-30 07:48:23 -07:00
test_token_block_dataset.py Relicense fairseq under MIT license (#786) 2019-07-30 07:48:23 -07:00
test_train.py Use 1-based indexing for epochs everywhere (#1053) 2020-03-04 16:37:24 -08:00
test_utils.py Fix max_position resolution with tuples having len > 2 (#2028) 2020-04-21 06:01:14 -07:00
transformer_quantization_config.yaml quant noise code, readme, start of adding quantization (#1896) 2020-04-21 09:28:56 -07:00
utils.py Pass all net_inputs in SequenceGenerator (#2090) 2020-05-10 06:13:06 -07:00