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
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
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
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
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
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
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
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
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
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
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
Summary: This is needed to support other build environments (e.g., Windows)
Reviewed By: ngoyal2707
Differential Revision: D19409984
fbshipit-source-id: e970510781abf92f1b02d0961bc30e1210b524dd