Commit Graph

12 Commits

Author SHA1 Message Date
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
Mike Ruberry
320bf8cf96 Updates full to no longer use deprecated integer fill_value type inference
Summary:
In PyTorch 1.5 using an integer fill_value and not setting the dtype or out kwarg with torch.full was deprecated, and soon will throw a runtime error. In the future, torch.full will infer its dtype from the fill_value, and these would produce integer, not float, tensors. This update maintains the current behavior.

Created from Diffusion's 'Open in Editor' feature.

Reviewed By: myleott

Differential Revision: D22161456

fbshipit-source-id: b5d687e4de83dba6e76cae6e61b5106bf5b320db
2020-06-22 11:56:58 -07:00
Marco Gaido
4ec169b988 Fix max_position resolution with tuples having len > 2 (#2028)
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)?
- [ ] Did you make sure to update the docs?
- [x] Did you write any new necessary tests?

## What does this PR do?
Fixes https://github.com/pytorch/fairseq/issues/2027 .

## 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/2028

Reviewed By: ngoyal2707

Differential Revision: D21134466

Pulled By: myleott

fbshipit-source-id: 070d7f971bc8d88ec1ca43d52797e2f0b07fb6af
2020-04-21 06:01:14 -07:00
Myle Ott
5028ed1b6b Reduce device-to-host transfers (#1082)
Summary: Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/1082

Differential Revision: D20365765

Pulled By: myleott

fbshipit-source-id: 7b6c14303b46b42db1a1e279c84dbe9cb2cf72f2
2020-03-11 05:57:16 -07:00
Myle Ott
e75cff5f2c Relicense fairseq under MIT license (#786)
Summary:
The previous BSD+PATENTS license was controversial. We have been
approved to relicense fairseq under the MIT license.
Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/786

Differential Revision: D16560654

Pulled By: myleott

fbshipit-source-id: f78b1beb4f2895dd7b9bfc79f5f952a2bfb94034
2019-07-30 07:48:23 -07:00
Myle Ott
e12e1d254c Simplify and generalize utils.make_positions
Summary: Pull Request resolved: https://github.com/pytorch/fairseq/pull/625

Differential Revision: D14822123

Pulled By: myleott

fbshipit-source-id: 8a263d30020588577ee02fb8c6959ff918705103
2019-04-15 07:32:11 -07:00
Myle Ott
6edf81ddfe
Remove more Variable() calls (#198) 2018-06-25 12:23:04 -04:00
Myle Ott
e89329d665 Updates for latest PyTorch 2018-06-15 13:05:22 -06:00
Myle Ott
ec0031df7b
Merge internal changes (#163) 2018-05-24 13:38:12 -04:00
Myle Ott
d3795d6cd1
Merge internal changes (#136)
Changes:
- 7d19e36: Add `--sampling` flag to generate.py to sample instead of doing beam search
- c777340: Add `scripts/average_checkpoints.py` to average multiple checkpoints into a combined model
- 3ea882c: Add `--max-update` option to train.py to stop training after a given number of updates
- small bugfixes for distributed training, LSTM, inverse square root LR scheduler
2018-04-02 10:13:07 -04:00
Myle Ott
6e4d370af9
More updates for PyTorch (#114) 2018-03-01 14:04:08 -05:00
Myle Ott
6641520612
fairseq-py goes distributed (#106)
This PR includes breaking API changes to modularize fairseq-py and adds support for distributed training across multiple nodes.

Changes:
- c7033ef: add support for distributed training! See updated README for usage.
- e016299: modularize fairseq-py, adding support for register_model, register_criterion, register_optimizer, etc.
- 154e440: update LSTM implementation to use PackedSequence objects in the encoder, better following best practices and improving perf
- 90c2973 and 1da6265: improve unit test coverage
2018-02-27 17:09:42 -05:00