Commit Graph

22 Commits

Author SHA1 Message Date
dianaml0
0dfd6b6240 Add linting with black (#2678)
Summary:
# Before submitting

- [ ] Was this discussed/approved via a Github issue? (no need for typos, doc improvements)
- [ ] Did you read the [contributor guideline](https://github.com/pytorch/fairseq/blob/main/CONTRIBUTING.md)?
- [ ] Did you make sure to update the docs?
- [ ] Did you write any new necessary tests?

## What does this PR do?
Fixes # (issue).

## PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

## Did you have fun?
Make sure you had fun coding �

Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/2678

Reviewed By: Mortimerp9

Differential Revision: D32653381

Pulled By: dianaml0

fbshipit-source-id: 2810d14867cd7d64f4d340740e2b590b82de47fe
2021-11-29 12:32:59 -08:00
alexeib
e6eddd805e make hydra/infer.py work; also dont break if something is removed fro… (#1903)
Summary:
previously hydra/infer.py did not always work for several reasons which are addressed here

new example usage:

PYTHONPATH=. python examples/speech_recognition/new/infer.py --config-dir examples/speech_recognition/hydra/conf --config-name infer task=audio_pretraining task.data=/path/to/data task.labels=ltr decoding.type=kenlm decoding.lexicon=/path/to/lexicon decoding.lmpath=/path/to/lm dataset.gen_subset=dev_other common_eval.path=/path/to/model.pt decoding.beam=5 decoding.lmweight=2 decoding.wordscore=-1

Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/1903

Reviewed By: arbabu123

Differential Revision: D28700795

Pulled By: alexeib

fbshipit-source-id: 66fe454de49c1bf511b3529ac683f1c8cb08e579
2021-05-26 16:29:10 -07:00
alexeib
649af635f4 Wav2vec u (#1889)
Summary:
Wav2vec-U implementation

Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/1889

Reviewed By: michaelauli

Differential Revision: D28596815

Pulled By: alexeib

fbshipit-source-id: bb09d081d167d5d10968acc6e056044bf96679ac
2021-05-21 07:34:11 -07:00
Myle Ott
7096ac3587 Make validate.py work with model parallel (#1570)
Summary: Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/1570

Test Plan: Imported from OSS

Reviewed By: gwenzek, ngoyal2707

Differential Revision: D25967675

Pulled By: myleott

fbshipit-source-id: 7c7f8d25b87ef9b4f0a85331548bb3a2886a1e92
2021-02-16 15:52:20 -08:00
alexeib
e607911dde fix passing task config in validate.py (#1426)
Summary: Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/1426

Reviewed By: aconneau

Differential Revision: D24895299

Pulled By: alexeib

fbshipit-source-id: 7af96952b857fa4616cdafd0268d8ab6cb94c61d
2020-11-11 17:33:46 -08:00
alexeib
11ea91a33a load dataset with saved task config (optionally) (#1423)
Summary:
this adds an argument to load_dataset that provides task configuration from the checkpoint. different tasks can decide what to do with it afterwards.

Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/1423

Reviewed By: myleott

Differential Revision: D24875706

Pulled By: alexeib

fbshipit-source-id: 5bb1e2b7495520c456024dc7b0751b65cb05b473
2020-11-11 10:15:10 -08:00
Myle Ott
f57b148938 Require process group for all helpers in distributed_utils (#1395)
Summary:
Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/1395

Data parallel command: `python train.py --task dummy_lm   --arch transformer_lm --tokens-per-sample 512   --max-sentences 8 --decoder-attention-heads 8 --dropout 0.0 --activation-dropout 0.0   --optimizer adam --lr 0.0001   --log-format simple --log-interval 1 --no-save --clip-norm 0.0`

Data parallel before:
```
2020-11-04 07:14:16 | INFO | fairseq_cli.train | training on 8 devices (GPUs/TPUs)
2020-11-04 07:14:16 | INFO | fairseq_cli.train | max tokens per GPU = None and batch size per GPU = 8
2020-11-04 07:14:16 | INFO | fairseq.trainer | no existing checkpoint found checkpoints/checkpoint_last.pt
2020-11-04 07:14:16 | INFO | fairseq.trainer | loading train data for epoch 1
2020-11-04 07:14:16 | INFO | fairseq.trainer | NOTE: your device may support faster training with --fp16
2020-11-04 07:14:16 | INFO | fairseq.optim.adam | using FusedAdam
2020-11-04 07:14:16 | INFO | fairseq.trainer | begin training epoch 1
2020-11-04 07:14:21 | INFO | train_inner | epoch 001:      1 / 1563 loss=16.297, ppl=80495, wps=0, ups=0, wpb=32768, bsz=64, num_updates=1, lr=0.0001, gnorm=2.501, train_wall=2, wall=5
2020-11-04 07:14:21 | INFO | train_inner | epoch 001:      2 / 1563 loss=15.399, ppl=43203.8, wps=101398, ups=3.09, wpb=32768, bsz=64, num_updates=2, lr=0.0001, gnorm=2.101, train_wall=0, wall=6
2020-11-04 07:14:21 | INFO | train_inner | epoch 001:      3 / 1563 loss=14.742, ppl=27411.2, wps=217567, ups=6.63, wpb=32768, bsz=64, num_updates=3, lr=0.0001, gnorm=1.888, train_wall=0, wall=6
2020-11-04 07:14:21 | INFO | train_inner | epoch 001:      4 / 1563 loss=14.206, ppl=18899.3, wps=219413, ups=6.69, wpb=32768, bsz=64, num_updates=4, lr=0.0001, gnorm=1.91, train_wall=0, wall=6
2020-11-04 07:14:22 | INFO | train_inner | epoch 001:      5 / 1563 loss=13.697, ppl=13282.1, wps=219446, ups=6.69, wpb=32768, bsz=64, num_updates=5, lr=0.0001, gnorm=1.98, train_wall=0, wall=6
2020-11-04 07:14:22 | INFO | train_inner | epoch 001:      6 / 1563 loss=13.179, ppl=9274.18, wps=220131, ups=6.71, wpb=32768, bsz=64, num_updates=6, lr=0.0001, gnorm=2.08, train_wall=0, wall=6
2020-11-04 07:14:22 | INFO | train_inner | epoch 001:      7 / 1563 loss=12.634, ppl=6358.37, wps=220236, ups=6.72, wpb=32768, bsz=64, num_updates=7, lr=0.0001, gnorm=2.195, train_wall=0, wall=6
2020-11-04 07:14:22 | INFO | train_inner | epoch 001:      8 / 1563 loss=12.056, ppl=4256.86, wps=220392, ups=6.72, wpb=32768, bsz=64, num_updates=8, lr=0.0001, gnorm=2.259, train_wall=0, wall=6
2020-11-04 07:14:22 | INFO | train_inner | epoch 001:      9 / 1563 loss=11.453, ppl=2804.05, wps=225842, ups=6.89, wpb=32768, bsz=64, num_updates=9, lr=0.0001, gnorm=2.287, train_wall=0, wall=7
2020-11-04 07:14:22 | INFO | train_inner | epoch 001:     10 / 1563 loss=10.842, ppl=1835, wps=238808, ups=7.28, wpb=32768, bsz=64, num_updates=10, lr=0.0001, gnorm=2.311, train_wall=0, wall=7
```

Data parallel after:
```
2020-11-04 07:14:47 | INFO | fairseq_cli.train | training on 8 devices (GPUs/TPUs)
2020-11-04 07:14:47 | INFO | fairseq_cli.train | max tokens per GPU = None and batch size per GPU = 8
2020-11-04 07:14:47 | INFO | fairseq.trainer | no existing checkpoint found checkpoints/checkpoint_last.pt
2020-11-04 07:14:47 | INFO | fairseq.trainer | loading train data for epoch 1
2020-11-04 07:14:47 | INFO | fairseq.trainer | NOTE: your device may support faster training with --fp16
2020-11-04 07:14:47 | INFO | fairseq.optim.adam | using FusedAdam
2020-11-04 07:14:47 | INFO | fairseq.trainer | begin training epoch 1
2020-11-04 07:14:52 | INFO | train_inner | epoch 001:      1 / 1563 loss=16.297, ppl=80495, wps=0, ups=0, wpb=32768, bsz=64, num_updates=1, lr=0.0001, gnorm=2.501, train_wall=2, wall=5
2020-11-04 07:14:52 | INFO | train_inner | epoch 001:      2 / 1563 loss=15.399, ppl=43203.8, wps=96089.4, ups=2.93, wpb=32768, bsz=64, num_updates=2, lr=0.0001, gnorm=2.101, train_wall=0, wall=5
2020-11-04 07:14:52 | INFO | train_inner | epoch 001:      3 / 1563 loss=14.742, ppl=27411.2, wps=239285, ups=7.3, wpb=32768, bsz=64, num_updates=3, lr=0.0001, gnorm=1.888, train_wall=0, wall=6
2020-11-04 07:14:53 | INFO | train_inner | epoch 001:      4 / 1563 loss=14.206, ppl=18899.3, wps=233039, ups=7.11, wpb=32768, bsz=64, num_updates=4, lr=0.0001, gnorm=1.91, train_wall=0, wall=6
2020-11-04 07:14:53 | INFO | train_inner | epoch 001:      5 / 1563 loss=13.697, ppl=13282.1, wps=237484, ups=7.24, wpb=32768, bsz=64, num_updates=5, lr=0.0001, gnorm=1.98, train_wall=0, wall=6
2020-11-04 07:14:53 | INFO | train_inner | epoch 001:      6 / 1563 loss=13.179, ppl=9274.18, wps=231683, ups=7.07, wpb=32768, bsz=64, num_updates=6, lr=0.0001, gnorm=2.08, train_wall=0, wall=6
2020-11-04 07:14:53 | INFO | train_inner | epoch 001:      7 / 1563 loss=12.634, ppl=6358.37, wps=233804, ups=7.13, wpb=32768, bsz=64, num_updates=7, lr=0.0001, gnorm=2.195, train_wall=0, wall=6
2020-11-04 07:14:53 | INFO | train_inner | epoch 001:      8 / 1563 loss=12.056, ppl=4256.86, wps=234025, ups=7.14, wpb=32768, bsz=64, num_updates=8, lr=0.0001, gnorm=2.259, train_wall=0, wall=6
2020-11-04 07:14:53 | INFO | train_inner | epoch 001:      9 / 1563 loss=11.453, ppl=2804.05, wps=238426, ups=7.27, wpb=32768, bsz=64, num_updates=9, lr=0.0001, gnorm=2.287, train_wall=0, wall=6
2020-11-04 07:14:53 | INFO | train_inner | epoch 001:     10 / 1563 loss=10.842, ppl=1835, wps=240069, ups=7.32, wpb=32768, bsz=64, num_updates=10, lr=0.0001, gnorm=2.311, train_wall=0, wall=6
```

Model parallel command: `python train.py --task dummy_lm --arch transformer_lm_megatron --decoder-layers 2 --batch-size 2 --tokens-per-sample 512 --log-format simple --log-interval 1 --fp16 --optimizer adam --model-parallel-size 2 --share-decoder-input-output-embed --lr 0.0001`

Model parallel before:
```
2020-11-04 07:12:22 | INFO | fairseq_cli.train | training on 8 devices (GPUs/TPUs)
2020-11-04 07:12:22 | INFO | fairseq_cli.train | max tokens per GPU = None and batch size per GPU = 2
2020-11-04 07:12:22 | INFO | fairseq.trainer | no existing checkpoint found checkpoints/checkpoint_last-model_part-0.pt
2020-11-04 07:12:22 | INFO | fairseq.trainer | loading train data for epoch 1
2020-11-04 07:12:23 | INFO | fairseq.optim.adam | using FusedAdam
2020-11-04 07:12:23 | INFO | fairseq.trainer | begin training epoch 1
2020-11-04 07:12:28 | INFO | train_inner | epoch 001:      1 / 12500 loss=60.017, ppl=1.16627e+18, wps=0, ups=0, wpb=4096, bsz=8, num_updates=1, lr=0.0001, gnorm=8.531, loss_scale=128, train_wall=2, wall=6
2020-11-04 07:12:28 | INFO | train_inner | epoch 001:      2 / 12500 loss=46.473, ppl=9.77028e+13, wps=48996.6, ups=11.95, wpb=4096, bsz=8, num_updates=2, lr=0.0001, gnorm=15.019, loss_scale=128, train_wall=0, wall=6
2020-11-04 07:12:28 | INFO | train_inner | epoch 001:      3 / 12500 loss=30.525, ppl=1.54543e+09, wps=58424.2, ups=14.25, wpb=4096, bsz=8, num_updates=3, lr=0.0001, gnorm=13.936, loss_scale=128, train_wall=0, wall=6
2020-11-04 07:12:28 | INFO | train_inner | epoch 001:      4 / 12500 loss=18.561, ppl=386799, wps=58399.5, ups=14.24, wpb=4096, bsz=8, num_updates=4, lr=0.0001, gnorm=7.251, loss_scale=128, train_wall=0, wall=6
2020-11-04 07:12:28 | INFO | train_inner | epoch 001:      5 / 12500 loss=15.145, ppl=36230, wps=58275.6, ups=14.21, wpb=4096, bsz=8, num_updates=5, lr=0.0001, gnorm=2.392, loss_scale=128, train_wall=0, wall=6
2020-11-04 07:12:28 | INFO | train_inner | epoch 001:      6 / 12500 loss=14.683, ppl=26304.2, wps=58704.8, ups=14.32, wpb=4096, bsz=8, num_updates=6, lr=0.0001, gnorm=2.487, loss_scale=128, train_wall=0, wall=6
2020-11-04 07:12:28 | INFO | train_inner | epoch 001:      7 / 12500 loss=14.169, ppl=18418.9, wps=58449.2, ups=14.26, wpb=4096, bsz=8, num_updates=7, lr=0.0001, gnorm=2.45, loss_scale=128, train_wall=0, wall=6
2020-11-04 07:12:29 | INFO | train_inner | epoch 001:      8 / 12500 loss=13.574, ppl=12197.4, wps=59106.5, ups=14.42, wpb=4096, bsz=8, num_updates=8, lr=0.0001, gnorm=2.393, loss_scale=128, train_wall=0, wall=6
2020-11-04 07:12:29 | INFO | train_inner | epoch 001:      9 / 12500 loss=12.974, ppl=8047.87, wps=58619.6, ups=14.3, wpb=4096, bsz=8, num_updates=9, lr=0.0001, gnorm=2.317, loss_scale=128, train_wall=0, wall=6
2020-11-04 07:12:29 | INFO | train_inner | epoch 001:     10 / 12500 loss=12.341, ppl=5187.55, wps=58166.5, ups=14.19, wpb=4096, bsz=8, num_updates=10, lr=0.0001, gnorm=2.213, loss_scale=128, train_wall=0, wall=6
```

Model parallel after:
```
2020-11-04 07:11:07 | INFO | fairseq_cli.train | training on 8 devices (GPUs/TPUs)
2020-11-04 07:11:07 | INFO | fairseq_cli.train | max tokens per GPU = None and batch size per GPU = 2
2020-11-04 07:11:07 | INFO | fairseq.trainer | no existing checkpoint found checkpoints/checkpoint_last-model_part-0.pt
2020-11-04 07:11:07 | INFO | fairseq.trainer | loading train data for epoch 1
2020-11-04 07:11:08 | INFO | fairseq.optim.adam | using FusedAdam
2020-11-04 07:11:08 | INFO | fairseq.trainer | begin training epoch 1
2020-11-04 07:11:13 | INFO | train_inner | epoch 001:      1 / 12500 loss=60.017, ppl=1.16627e+18, wps=0, ups=0, wpb=4096, bsz=8, num_updates=1, lr=0.0001, gnorm=8.531, loss_scale=128, train_wall=2, wall=6
2020-11-04 07:11:13 | INFO | train_inner | epoch 001:      2 / 12500 loss=46.473, ppl=9.77028e+13, wps=47018.1, ups=11.47, wpb=4096, bsz=8, num_updates=2, lr=0.0001, gnorm=15.019, loss_scale=128, train_wall=0, wall=6
2020-11-04 07:11:13 | INFO | train_inner | epoch 001:      3 / 12500 loss=30.525, ppl=1.54543e+09, wps=59292.6, ups=14.46, wpb=4096, bsz=8, num_updates=3, lr=0.0001, gnorm=13.936, loss_scale=128, train_wall=0, wall=6
2020-11-04 07:11:13 | INFO | train_inner | epoch 001:      4 / 12500 loss=18.561, ppl=386799, wps=57708.9, ups=14.08, wpb=4096, bsz=8, num_updates=4, lr=0.0001, gnorm=7.251, loss_scale=128, train_wall=0, wall=6
2020-11-04 07:11:14 | INFO | train_inner | epoch 001:      5 / 12500 loss=15.145, ppl=36230, wps=57427.4, ups=14.01, wpb=4096, bsz=8, num_updates=5, lr=0.0001, gnorm=2.392, loss_scale=128, train_wall=0, wall=6
2020-11-04 07:11:14 | INFO | train_inner | epoch 001:      6 / 12500 loss=14.683, ppl=26304.2, wps=58730.2, ups=14.33, wpb=4096, bsz=8, num_updates=6, lr=0.0001, gnorm=2.487, loss_scale=128, train_wall=0, wall=6
2020-11-04 07:11:14 | INFO | train_inner | epoch 001:      7 / 12500 loss=14.169, ppl=18418.9, wps=59523.2, ups=14.52, wpb=4096, bsz=8, num_updates=7, lr=0.0001, gnorm=2.45, loss_scale=128, train_wall=0, wall=6
2020-11-04 07:11:14 | INFO | train_inner | epoch 001:      8 / 12500 loss=13.574, ppl=12197.4, wps=58945.2, ups=14.38, wpb=4096, bsz=8, num_updates=8, lr=0.0001, gnorm=2.393, loss_scale=128, train_wall=0, wall=6
2020-11-04 07:11:14 | INFO | train_inner | epoch 001:      9 / 12500 loss=12.974, ppl=8047.87, wps=59659.2, ups=14.55, wpb=4096, bsz=8, num_updates=9, lr=0.0001, gnorm=2.317, loss_scale=128, train_wall=0, wall=7
2020-11-04 07:11:14 | INFO | train_inner | epoch 001:     10 / 12500 loss=12.341, ppl=5187.55, wps=59681.4, ups=14.56, wpb=4096, bsz=8, num_updates=10, lr=0.0001, gnorm=2.213, loss_scale=128, train_wall=0, wall=7
```

Test Plan: Imported from OSS

Reviewed By: ngoyal2707

Differential Revision: D24728687

Pulled By: myleott

fbshipit-source-id: 2d387d022ee889494f429b98df1942167896e306
2020-11-05 09:44:32 -08:00
alexeib
f6d9313092 fix eval lm (#1380)
Summary:
fixes eval lm that wasnt parsing arguments correctly

Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/1380

Reviewed By: myleott

Differential Revision: D24600415

Pulled By: alexeib

fbshipit-source-id: eb56575bef4d20a3cd5cee3dcd279046f085d938
2020-10-28 14:59:44 -07:00
Myle Ott
01be083e46 Centralize hydra init (and support packaged location of configs) (#2784)
Summary:
Configs can either be in `/fairseq/configs` (once the package is installed) or `/configs` (if using an editable installation). This centralizes the hydra init and supports these two possible config locations.

Pull Request resolved: https://github.com/pytorch/fairseq/pull/2784

Reviewed By: alexeib

Differential Revision: D24513586

Pulled By: myleott

fbshipit-source-id: 8e10a88177ebcf809d5d37d448d2b384142febef
2020-10-27 07:46:44 -07:00
alexeib
2409d5a36e refactor dataclass related files, add proper types for static checkin… (#1371)
Summary:
- refactor dataclass/ hierarchy to make it a bit more sane (while avoiding circular references)
- add top level FairseqConfig
- change typehints to reflect the correct config type if it is known

Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/1371

Reviewed By: myleott

Differential Revision: D24469026

Pulled By: alexeib

fbshipit-source-id: 01f68918f761d51ec5216286b8959ad35f41a7b2
2020-10-23 00:07:33 -07:00
alexeib
3b27ed7996 Enable Hydra configs in fairseq (#1343) (#1510)
Summary:
Pull Request resolved: https://github.com/facebookresearch/pytext/pull/1510

this is the main pr that switches on hydra functionality in fairseq

we migrate "args" object into omegaconf "DictConfig" at all legacy entry points

in addition this migrates various components from secondary registries (like bpe encoders and tokenizers) to make the migration smoother

i am going through code that references migrated fairseq components and changing it to inherit from "Legacy*" components instead. hopefully tests will catch most of this

Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/1343

Reviewed By: myleott

Differential Revision: D23973928

Pulled By: alexeib

fbshipit-source-id: dd9554981fff51ea75c1ff343874d1d6e61793c9
2020-10-20 00:32:26 -07:00
Myle Ott
a48f235636 Apply black+isort (#1357)
Summary: Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/1357

Reviewed By: alexeib

Differential Revision: D24377772

fbshipit-source-id: 51581af041d42d62166b33a35a1a4228b1a76f0c
2020-10-18 18:14:51 -07:00
alexeib
e3c4282551 remove max_sentences from args, use batch_size instead (#1333)
Summary:
now that we are moving to using dataclasses to define fairseq configuration, having aliases for options is no longer practical. this pr removes "max-sentences" argument while keeping its alias "batch-size", which is more appropriate

Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/1333

Reviewed By: shruti-bh

Differential Revision: D24121305

Pulled By: alexeib

fbshipit-source-id: 34343cea54c8f2c8b059c38ef9f29b66e76df9fb
2020-10-05 19:09:01 -07:00
Myle Ott
1cc8e95cec Don't cache epoch iterators when using sharded datasets (#1268)
Summary:
Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/1268

We previously had a memory leak when using sharded datasets. In particular,
each sharded dataset is a new FairseqDataset instance, and the cache is keyed
by the `dataset` instance. Since we never clear the cache, this would
eventually cause the system to run out of CPU RAM.

This diff disables caching when using sharded datasets.

Note that we also change the signature to `get_batch_iterator`, which needs to
propagate to many places. We previously avoided this update when adding
`data_buffer_size`, so I'm also adding that everywhere.

Reviewed By: ngoyal2707

Differential Revision: D23319135

fbshipit-source-id: 6bcd6aee141ad9cc234448c49106a8dbf8ea1800
2020-09-09 06:20:31 -07:00
Myle Ott
fe1b1bbe17 Misc fixes (#2524)
Summary: Pull Request resolved: https://github.com/pytorch/fairseq/pull/2524

Reviewed By: ngoyal2707

Differential Revision: D23318746

Pulled By: myleott

fbshipit-source-id: 6db6a87aac178847bd0da26db09b1a63632a724f
2020-08-31 11:29:21 -07:00
Myle Ott
2f7e3f3323 Support multi-GPU validation in fairseq-validate (#2162)
Summary: Pull Request resolved: https://github.com/pytorch/fairseq/pull/2162

Reviewed By: ngoyal2707

Differential Revision: D21663181

Pulled By: myleott

fbshipit-source-id: d01e64f97482f76bd601cd8b20232c0ef637bb8a
2020-05-27 10:24:54 -07:00
Naman Goyal
d37fdee3da adding code to load and save model parallel checkpoint (#1119)
Summary:
# Before submitting

- [ ] Was this discussed/approved via a Github issue? (no need for typos, doc improvements)
- [ ] Did you read the [contributor guideline](https://github.com/pytorch/fairseq/blob/master/CONTRIBUTING.md)?
- [ ] Did you make sure to update the docs?
- [ ] Did you write any new necessary tests?

## What does this PR do?
Fixes # (issue).

## PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

## Did you have fun?
Make sure you had fun coding �
Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/1119

Reviewed By: myleott

Differential Revision: D20712488

fbshipit-source-id: 941ef251c9e2deb8933d88188fac56ee8c5be9b7
2020-03-27 20:22:36 -07:00
Naman Goyal
f3680fd804 adding eval lm changes for model parallel (#1113)
Summary:
# Before submitting

- [ ] Was this discussed/approved via a Github issue? (no need for typos, doc improvements)
- [ ] Did you read the [contributor guideline](https://github.com/pytorch/fairseq/blob/master/CONTRIBUTING.md)?
- [ ] Did you make sure to update the docs?
- [ ] Did you write any new necessary tests?

## What does this PR do?
Fixes # (issue).

## PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

## Did you have fun?
Make sure you had fun coding �
Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/1113

Reviewed By: myleott

Differential Revision: D20670665

fbshipit-source-id: 8e2846637195b7200f1f60a8421d2fe5ffab789b
2020-03-27 15:22:57 -07:00
Myle Ott
aa79bb9c37 Use 1-based indexing for epochs everywhere (#1053)
Summary:
We are somewhat inconsistent in whether we're using 0-based or 1-based indexing for epochs. This should fix things to be 0-based internally, with logging and checkpoint naming still using 1-based indexing.
Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/1053

Reviewed By: spencerp

Differential Revision: D20160715

Pulled By: myleott

fbshipit-source-id: 4ed94f9c371e1bfe29bcfa087fa6756507d6e627
2020-03-04 16:37:24 -08:00
Myle Ott
077c351d7e Fix comments and logger name in validate.py (#1061)
Summary: Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/1061

Differential Revision: D20238796

Pulled By: myleott

fbshipit-source-id: cf48bd7f6cdae05e91868a9d2efd91dc8e72bb12
2020-03-04 14:05:24 -08:00
Myle Ott
f8b795f427 Move meters, metrics and progress_bar into fairseq.logging (#1046)
Summary: Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/1046

Differential Revision: D20030412

Pulled By: myleott

fbshipit-source-id: bd87391aa9cdb73306ee90a30eeb2bdeff3690f9
2020-02-27 08:24:59 -08:00
Myle Ott
b488e1fe56 Reverse symlinks in root and fairseq_cli (2/3)
Summary: This is needed to support other build environments (e.g., Windows)

Reviewed By: ngoyal2707

Differential Revision: D19409984

fbshipit-source-id: e970510781abf92f1b02d0961bc30e1210b524dd
2020-01-17 08:26:20 -08:00