Commit Graph

7580 Commits

Author SHA1 Message Date
Sylvain Gugger
084873b025
Only test the files impacted by changes in the diff (#12644)
* Base test

* More test

* Fix mistake

* Add a docstring change

* Add doc ignore

* Add changes

* Add recursive dep search

* Add recursive dep search

* save

* Finalize test mapping

* Fix bug

* Print prettier

* Ignore comments and empty lines

* Make script runnable from anywhere

* Need dev install

* Like that

* Adapt

* Add as artifact

* Try on torch tests

* Fix yaml error

* Install GitPython

* Apply everywhere

* Be more defensive

* Revert to all tests if something is wrong

* Install GitPython

* Test if there are tests before launching.

* Fixes

* Fixes

* Fixes

* Fixes

* Bash syntax is horrible

* Be less stupid

* Try differently

* Typo

* Typo

* Typo

* Style

* Better name

* Escape quotes

* Ignore black unhelpful re-formatting

* Not a docstring

* Deal with inits in dependency map

* Run all tests once PR is merged.

* Add last job

* Apply suggestions from code review

Co-authored-by: Stas Bekman <stas00@users.noreply.github.com>

* Stronger dependencies gather

* Ignore empty lines too!

* Clean up

* Fix quality

Co-authored-by: Stas Bekman <stas00@users.noreply.github.com>
2021-07-14 10:56:55 -04:00
Funtowicz Morgan
11edecd753
Fix uninitialized variables when config.mask_feature_prob > 0 (#12705) 2021-07-14 15:30:19 +01:00
Matt
f9ac677eba
Update TF examples README (#12703)
* Update Transformers README, rename token_classification example to token-classification to be consistent with the others

* Update examples/tensorflow/README.md

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

* Add README for TF token classification

* Update examples/tensorflow/token-classification/README.md

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

* Update examples/tensorflow/token-classification/README.md

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2021-07-14 15:15:25 +01:00
Patrick von Platen
f4399ec570
Update README.md 2021-07-14 12:54:31 +01:00
Funtowicz Morgan
d94773e685
Provide mask_time_indices to _mask_hidden_states to avoid double masking (#12692)
* We need to provide mask_time_indices to `_mask_hidden_states` to avoid applying the mask two times

* apply the same to wav2vec2

* Uniformize the style between hubert and wav2vec2

* fix tf as well

Co-authored-by: patrickvonplaten <patrick.v.platen@gmail.com>
2021-07-14 12:17:33 +01:00
Sylvain Gugger
144cea253f
Fix multiple choice doc examples (#12679) 2021-07-14 03:35:18 -04:00
Stas Bekman
5dd0c956a8
non-native optimizers are mostly ok with zero-offload (#12690) 2021-07-13 20:18:51 -07:00
yujun
4cdb7ee51d
fix #11724 (#11897) 2021-07-13 22:18:54 +01:00
Lysandre Debut
83f025125d
Add timeout to CI. (#12684)
* Global 60-300 seconds timeout

* Add verbose option

* [skip ci] typo
2021-07-13 15:13:18 -04:00
Stas Bekman
78f5fe1416
[Deepspeed] adapt multiple models, add zero_to_fp32 tests (#12477)
* zero_to_fp32 tests

* args change

* remove unnecessary work

* use transformers.trainer_utils.get_last_checkpoint

* document the new features

* cleanup

* wip

* fix fsmt

* add bert

* cleanup

* add xlm-roberta

* electra works

* cleanup

* sync

* split off the model zoo tests

* cleanup

* cleanup

* cleanup

* cleanup

* reformat

* cleanup

* casing

* deepspeed>=0.4.3

* adjust distilbert

* Update docs/source/main_classes/deepspeed.rst

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

* style

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2021-07-13 12:07:32 -07:00
Matt
65bf05cd18
Adding TF translation example (#12667)
* Adding TF translation example

* Fixes and style pass for TF translation example

* Remove unused postprocess_text copied from run_summarization

* Adding README

* Review fixes

* Move changes to model.config to after we've initialized the model
2021-07-13 19:08:25 +01:00
Patrick von Platen
cee2d2135f
[Flax Generation] Correct inconsistencies PyTorch/Flax (#12662)
* fix_torch_device_generate_test

* remove @

* correct greedy search

* save intertmed

* add final logits bias

* correct

* up

* add more tests

* fix another bug

* finish tests

* finish marian tests

* up

Co-authored-by: Patrick von Platen <patrick@huggingface.co>
2021-07-13 18:53:30 +01:00
Stas Bekman
7a22a02a70
[tokenizer.prepare_seq2seq_batch] change deprecation to be easily actionable (#12669)
* change deprecation to be easily actionable

* Update src/transformers/tokenization_utils_base.py

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

* rework as suggested

* one warning together

* fix format

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2021-07-13 09:19:04 -07:00
qqaatw
711d901c49
Fix minor docstring typos. (#12682) 2021-07-13 12:08:15 -04:00
Sylvain Gugger
90178b0cef
Add option to load a pretrained model with mismatched shapes (#12664)
* Add option to load a pretrained model with mismatched shapes

* Fail at loading when mismatched shapes in Flax

* Fix tests

* Update src/transformers/modeling_flax_utils.py

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>

* Address review comments

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
2021-07-13 10:15:15 -04:00
Patrick von Platen
7f6d375029
[Blenderbot] Fix docs (#12227)
* fix_torch_device_generate_test

* remove @

* fix docs
2021-07-13 14:17:31 +01:00
Jeroen Steggink
9519f0cd63
Wrong model is used in example, should be character instead of subword model (#12676)
* Wrong model is used, should be character instead of subword

In the original Google repo for CANINE there was mixup in the model names in the README.md, which was fixed 2 weeks ago. Since this transformer model was created before, it probably resulted in wrong use in this example.

s = subword, c = character

* canine.rst style fix

* Update docs/source/model_doc/canine.rst

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

* Styling canine.rst

* Added links to model cards.

* Fixed links to model cards.

Co-authored-by: Jeroen Steggink <978411+jsteggink@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2021-07-13 08:40:27 -04:00
Nick Doiron
5803a2a7ac
Add ByT5 option to example run_t5_mlm_flax.py (#12634)
* Allow ByT5 type in Flax T5 script

* use T5TokenizerFast

* change up tokenizer config

* model_args

* reorder imports

* Update run_t5_mlm_flax.py
2021-07-13 13:39:57 +01:00
Lysandre Debut
9da1acaea2
**encode_plus() shouldn't run for W2V2CTC (#12655)
* **encode_plus() shouldn't run for  W2V2CTC

* Typo
2021-07-13 06:31:56 -04:00
Lysandre Debut
a6938c4721
Patch BigBird tokenization test (#12653) 2021-07-13 02:53:06 -04:00
Omar Sanseviero
c523b241c2
Update timeline for Flax event evaluation 2021-07-12 21:24:58 +02:00
Kevin Canwen Xu
dc06e43580
Fix typo in README_zh-hans.md (#12663) 2021-07-13 01:50:12 +08:00
Kevin Canwen Xu
9d771c5472
Translate README.md to Simplified Chinese (#12596)
* README Translation for Chinese (Simplified)

* update link

* h3->h4

* html refactor

* update model list

* fix

* Add a translation guide

* format

* update

* typo

* Refine wording
2021-07-13 01:19:54 +08:00
Philip May
21a81c1e3c
fix typo in modeling_t5.py docstring (#12640) 2021-07-12 12:24:32 -04:00
Ahmed Khaled
b90d499372
fixed docs (#12646) 2021-07-12 12:03:13 -04:00
Philipp Schmid
da0e9ee697
remove documentation (#12657) 2021-07-12 18:02:51 +02:00
Lysandre Debut
b189226e8c
Fix transfo xl integration test (#12652)
* Cleanup test

* Skip TF TransfoXL test
2021-07-12 11:51:35 -04:00
Lysandre Debut
fd41e2daf4
Pipeline should be agnostic (#12656) 2021-07-12 11:42:59 -04:00
Sylvain Gugger
9b3aab2cce
Pickle auto models (#12654)
* PoC, it pickles!

* Remove old method.

* Apply to every auto object
2021-07-12 11:15:54 -04:00
Matt
379f649434
TF summarization example (#12617)
* Adding a TF summarization example

* Style pass

* Style fixes

* Updates for review comments

* Adding README

* Style pass

* Remove unused import
2021-07-12 15:58:38 +01:00
Sylvain Gugger
0f43e742d9 Fix typo 2021-07-12 10:32:51 -04:00
Sylvain Gugger
9adff7a0f4 Fix syntax in conda file 2021-07-12 09:57:54 -04:00
Sylvain Gugger
ad42054278 Minimum requirement for pyyaml 2021-07-12 09:55:36 -04:00
Lysandre Debut
fb5665b5ad
The extended trainer tests should require torch (#12650) 2021-07-12 09:47:05 -04:00
Lysandre Debut
0af8579bbe
Skip TestMarian_MT_EN (#12649)
* Skip TestMarian_MT_EN

* Skip EN_ZH and EN_ROMANCE

* Skip EN_ROMANCE pipeline
2021-07-12 09:11:32 -04:00
Lewis Bails
a882b9facb
Add tokenizer_file parameter to PreTrainedTokenizerFast docstring (#12624)
Co-authored-by: Lewis Bails <Lewis.Bails@infomedia.dk>
2021-07-12 07:51:58 -04:00
Suraj Patil
f8f9a679a0
fix type check (#12638) 2021-07-12 10:48:43 +01:00
Eduardo Gonzalez Ponferrada
2dd9440d08
Point to the right file for hybrid CLIP (#12599) 2021-07-12 12:16:22 +05:30
Bhadresh Savani
de23ecea36
added test file (#12630) 2021-07-12 12:15:14 +05:30
Stas Bekman
9ee66adadb
fix anchor (#12620) 2021-07-09 18:48:28 -07:00
Stas Bekman
0dcc3c86e4
[doc] DP/PP/TP/etc parallelism (#12524)
* wip

* complete the doc

* missing img

* improve

* correction

* Apply suggestions from code review

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2021-07-09 17:39:09 -07:00
Stas Bekman
4cdbf63c03
[debugging utils] minor doc improvements (#12525) 2021-07-09 17:38:28 -07:00
Will Rice
fb65f65ea6
Add TFHubertModel (#12206)
* TFHubert

* Update with TFWav2Vec Bug Fixes

* Add OOV Error

* Feedback changes

* Fix kwargs call
2021-07-09 18:55:25 +01:00
Patrick von Platen
934222e3c5
[FLax] Fix marian docs 2 (#12615)
* fix_torch_device_generate_test

* remove @

* up
2021-07-09 18:28:57 +01:00
Patrick von Platen
165606e5b4
[Flax Marian] Add marian flax example (#12614)
* fix_torch_device_generate_test

* remove @

* finish better examples for marian flax
2021-07-09 18:01:58 +01:00
Patrick von Platen
51eb6d3457
[Flax] Fix mt5 auto (#12612)
* fix_torch_device_generate_test

* remove @

* fix mt5 auto
2021-07-09 17:33:04 +01:00
Alex Hedges
e7f33e8cb3
Pass model_kwargs when loading a model in pipeline() (#12449)
* Pass model_kwargs when loading a model in pipeline

* Add test for model_kwargs parameter of pipeline()

* Rewrite test to not download model

* Fix failing style checks
2021-07-09 09:24:55 -04:00
Sylvain Gugger
18ca59e1d3
Fix arg count for partial functions (#12609) 2021-07-09 09:24:42 -04:00
Sylvain Gugger
0cc2dc2456
Simplify unk token (#12582)
* Base test

* More test

* Fix mistake

* Add a docstring change

* Add doc ignore

* Simplify logic for unk token in Unigram tokenizers

* Remove changes from otehr branch
2021-07-09 09:02:34 -04:00
Patrick von Platen
deecdd4939
[Flax] Fix cur step flax examples (#12608)
* fix_torch_device_generate_test

* remove @

* fix save problem
2021-07-09 13:51:28 +01:00