Commit Graph

30 Commits

Author SHA1 Message Date
Myle Ott
5e343f5f23 Remove --distributed-wrapper (consolidate to --ddp-backend) (#1544)
Summary: Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/1544

Test Plan: Imported from OSS

Reviewed By: girifb

Differential Revision: D25836856

Pulled By: myleott

fbshipit-source-id: eb0a6a02f4d9fe2b6b12a456ef95208dd92c97cb
2021-01-28 14:21:08 -08:00
Myle Ott
4817a9142f Cleanup CosineLRScheduler and change defaults (#1487)
Summary:
Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/1487

Here's the code for CosineLRScheduler that I used as a reference: 577e4fa78a/fairseq/optim/lr_scheduler/cosine_lr_schedul

In the reference:
- `warmup_init_lr` defaults to `args.lr[0]`
- `warmup_end_lr` defaults to `args.max_lr`
- `min_lr` defaults to `args.lr[0]`  (note that there's also a `args.min_lr` option defined in the global fairseq config, but this is unused by the cosine scheduler)
- `max_lr` is a required option

This diff removes `max_lr` and replaces it with `lr[0]` to be more
consistent with other LR schedulers. We then add an explicit `min_lr`
option to the Config.

Test Plan: Imported from OSS

Reviewed By: alexeib

Differential Revision: D25342180

Pulled By: myleott

fbshipit-source-id: 61281666e68839da8efc4714c2ce8c49dc4c8e6e
2020-12-05 07:37:52 -08:00
Myle Ott
72a25a4e52 Rename optimization.min_lr -> optimization.stop_min_lr (#1486)
Summary: Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/1486

Test Plan: Imported from OSS

Reviewed By: alexeib

Differential Revision: D25342181

Pulled By: myleott

fbshipit-source-id: 7d1cfb26334fff26d688648724ab073e5fb956f5
2020-12-05 07:37:51 -08:00
UriSha
18d3b5c8b0 Update wikitext url (#2871)
Summary:
# Before submitting

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

## What does this PR do?
Update WikiText-103 url

## 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/pytorch/fairseq/pull/2871

Reviewed By: myleott

Differential Revision: D24835953

Pulled By: alexeib

fbshipit-source-id: 890e911d528c04de0dc056e55866afb46a2bd87f
2020-11-09 11:30:22 -08: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
9831634946 Misc fixes (#2448)
Summary: Pull Request resolved: https://github.com/pytorch/fairseq/pull/2448

Reviewed By: ngoyal2707

Differential Revision: D23011193

Pulled By: myleott

fbshipit-source-id: 1a29481707108e4465aca78ec1581fb79f05efba
2020-08-14 10:24:51 -07:00
Myle Ott
8e48f45aa4 Miscellaneous fixes (#2193)
Summary: Pull Request resolved: https://github.com/pytorch/fairseq/pull/2193

Reviewed By: ngoyal2707

Differential Revision: D21748548

Pulled By: myleott

fbshipit-source-id: d9f64540b55b4d427b3da6ad04a35f7b988b049a
2020-05-28 07:29:59 -07:00
Vlad Lyalin
e13eeab04b upd wikitext-103 url (#1847)
Summary:
Very minor update, just changing the url. The old one is 404.
Pull Request resolved: https://github.com/pytorch/fairseq/pull/1847

Reviewed By: ngoyal2707

Differential Revision: D20490970

Pulled By: myleott

fbshipit-source-id: 9c2fbe97e3dd450094a95db9f934945e87637ae1
2020-03-17 09:12:37 -07:00
Myle Ott
0790c0cfc3 Doc improvements
Summary: Pull Request resolved: https://github.com/pytorch/fairseq/pull/1606

Differential Revision: D19330727

Pulled By: myleott

fbshipit-source-id: dc6d100e42566efbc2ebc955689878ed8a820861
2020-01-09 13:27:51 -08:00
sai-prasanna
3b53962cd7 Refactor hub interface for batched inference (#1539) (#1539)
Summary:
# Before submitting

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

## What does this PR do?
Fixes https://github.com/pytorch/fairseq/issues/1508.
Pull Request resolved: https://github.com/pytorch/fairseq/pull/1539

Pulled By: myleott

Differential Revision: D19216104

fbshipit-source-id: 14917c1459b8794eeb74c09a16b9899c366242d2
2019-12-25 19:20:39 -08:00
Myle Ott
9d7725226d Add .score function to hub interface
Summary: Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/957

Differential Revision: D19161825

Pulled By: myleott

fbshipit-source-id: 726b9c1645058d993eb514b9e91c442683521bd0
2019-12-18 12:11:32 -08:00
Myle Ott
3f4faafbaf Simplify example LM config
Summary: Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/935

Differential Revision: D18852262

Pulled By: myleott

fbshipit-source-id: affe54703148c30105415efb1bdf050132936354
2019-12-06 07:10:38 -08:00
Myle Ott
a0f75996b1 Fix building of docs
Summary: Pull Request resolved: https://github.com/pytorch/fairseq/pull/1340

Differential Revision: D18289455

Pulled By: myleott

fbshipit-source-id: a1c8163a35273b6c646d300142701e8a317d7378
2019-11-02 16:52:50 -07:00
Sosuke Kobayashi
920b85d4bd Minor update of README.md of language model example (#1063)
Summary:
With this white space, the command might fail.
```
fairseq-preprocess: error: unrecognized arguments:
zsh: command not found: --destdir
```
Pull Request resolved: https://github.com/pytorch/fairseq/pull/1063

Differential Revision: D17072516

Pulled By: myleott

fbshipit-source-id: 68bb9d05b40b215b18aceac2bff3f5ec1ef2f537
2019-08-27 08:40:54 -07:00
Myle Ott
3c2cf3b02a Misc changes
Summary: Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/840

Differential Revision: D16947645

Pulled By: myleott

fbshipit-source-id: e869789bc22bbf5cb08d9adfa44f9fc09b3805af
2019-08-21 17:42:27 -07:00
Myle Ott
b870468689 Update READMEs
Summary: Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/823

Differential Revision: D16804995

Pulled By: myleott

fbshipit-source-id: abac5dc0ed6b7bfe2309ba273456e54b37340b2c
2019-08-14 08:28:36 -07:00
Myle Ott
abb7ed4c91 Update READMEs for torch.hub
Summary: Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/795

Differential Revision: D16620488

Pulled By: myleott

fbshipit-source-id: 1998a9ccd8816fc7f590861fb4898f910a36bc1e
2019-08-02 06:24:17 -07:00
Dongjin Na
c5650bfc0a Update language_model README.md (#941)
Summary:
Adding a backslash in the convolutional language model training usage.
Pull Request resolved: https://github.com/pytorch/fairseq/pull/941

Differential Revision: D16581388

Pulled By: myleott

fbshipit-source-id: 7e2e05ecf13e86cb844dc5200d49f560c63b12ff
2019-07-31 08:37:09 -07:00
Myle Ott
3d764a3dc6 Update torch.hub usage
Summary: Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/770

Differential Revision: D16491911

Pulled By: myleott

fbshipit-source-id: 8dd2b76f8fa24183640ae9d1129ea47ded77d43d
2019-07-25 06:33:51 -07:00
Myle Ott
5bdee18e96 Iterate on torch.hub interface
Summary: Pull Request resolved: https://github.com/pytorch/fairseq/pull/793

Differential Revision: D15758755

Pulled By: myleott

fbshipit-source-id: b93e4ac11bde36a0b59b4d6d1c84d31c3124d767
2019-06-11 15:04:43 -07:00
Myle Ott
6a21b232a7 Backward compatibility + updated links for pretrained language models
Summary: Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/624

Differential Revision: D15595746

Pulled By: myleott

fbshipit-source-id: b79e489de9ff37ee7cbf939092a6e5ec0dbebbf5
2019-06-02 07:31:37 -07:00
Myle Ott
d45db80431 Merge internal changes (#654)
Summary:
- Add --add-bos-token option to LM task
- Cleanup utils.py and options.py
Pull Request resolved: https://github.com/pytorch/fairseq/pull/654

Differential Revision: D15041794

Pulled By: myleott

fbshipit-source-id: 3ad00007769d5f48308052cfd40de39c5ffa1a6e
2019-04-29 19:50:58 -07:00
Stefan Schweter
8ab27e6e1e Documentation: fix link to language model readme (#600)
Summary:
Hi,

currently, the link to the language model readme is broken on the `examples/language_model/transformer_lm` page.

This PR fixes the link :)
Pull Request resolved: https://github.com/pytorch/fairseq/pull/600

Differential Revision: D14680985

Pulled By: myleott

fbshipit-source-id: 62291efbf4ece2af54fae45c408c2759863f9847
2019-03-28 22:41:51 -07:00
Myle Ott
e6422528da 0.6.1 -> 0.6.2 (#577)
Summary:
Changelog:
- 998ba4f: Add language models from Baevski & Auli (2018)
- 4294c4f: Add mixture of experts code from Shen et al. (2019)
- 0049349: Add example for multilingual training
- 48d9afb: Speed improvements, including fused operators from apex
- 44d27e6: Add Tensorboard support
- d17fa85: Add Adadelta optimizer
- 9e1c880: Add `FairseqEncoderModel`
- b65c579: Add `FairseqTask.inference_step` to modularize generate.py
- 2ad1178: Add back `--curriculum`
- Misc bug fixes and other features

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

Differential Revision: D14481233

Pulled By: myleott

fbshipit-source-id: 4ff8625ef1c0b24273fc65df7c5658e3c932e8b7
2019-03-15 10:27:01 -07:00
Jo Chuang
19b6e8bf1e Extract after skipping download for LM example script
Summary: Pull Request resolved: https://github.com/pytorch/fairseq/pull/538

Differential Revision: D14258736

Pulled By: myleott

fbshipit-source-id: ca16355e4c4700fc8eecf2c9374ec170bca826a4
2019-02-28 07:16:47 -08:00
Myle Ott
fbd4cef9a5 Add fairseq to PyPI (#495)
Summary:
- fairseq can now be installed via pip: `pip install fairseq`
- command-line tools are globally accessible: `fairseq-preprocess`, `fairseq-train`, `fairseq-generate`, etc.
Pull Request resolved: https://github.com/pytorch/fairseq/pull/495

Differential Revision: D14017761

Pulled By: myleott

fbshipit-source-id: 10c9f6634a3056074eac2f33324b4f1f404d4235
2019-02-08 22:03:29 -08:00
Myle Ott
b41c74dc5b Add code for "Pay Less Attention with Lightweight and Dynamic Convolutions" (#473)
Summary:
Changelog:
- `e330f56`: Add code for the "Pay Less Attention with Lightweight and Dynamic Convolutions" paper
- `5e3b98c`: Add scripts for computing tokenized BLEU with compound splitting and sacrebleu
- update READMEs
- misc fixes
Pull Request resolved: https://github.com/pytorch/fairseq/pull/473

Differential Revision: D13819717

Pulled By: myleott

fbshipit-source-id: f2dc12ea89a436b950cafec3593ed1b04af808e9
2019-01-25 15:40:26 -08:00
Art Matsak
73876ce3b6 Fix broken link in README.md (#436)
Summary:
https://einstein.ai/research/the-wikitext-long-term-dependency-language-modeling-dataset is not longer valid, redirects to a blog post listing page.
Pull Request resolved: https://github.com/pytorch/fairseq/pull/436

Differential Revision: D13607961

Pulled By: myleott

fbshipit-source-id: 1a1074ffcbc454e29bc9d5aed84fdf2089a224bc
2019-01-09 07:35:02 -08:00
Myle Ott
ff68a9ef50 Add FairseqTask
A Task defines the data format, stores shared state (e.g., dictionaries) and provides helpers for building the model/criterion and calculating the loss.

Changes:
- Add TranslationTask and LanguageModelingTask. New tasks can be registered with @register_task decorator.
- Add EpochBatchIterator to encapsulate batching and saving/restoring dataloader position
- Remove LEFT_PAD_* constants and make them configurable per task
2018-06-15 13:05:22 -06:00
Alexei Baevski
c778a31e2b create examples dir and add conv lm + stories readme 2018-06-15 13:05:20 -06:00