Sylvain Gugger
7783fa6bb3
Fix quality and repo consistency
2022-05-09 11:14:36 -04:00
Sourab Mangrulkar
05fc1766ff
PyTorch FSDP integration in Trainer ( #17136 )
...
* PyTorch FSDP integration in Trainer
* reformatting
make style and make quality are now compliant.
* Updating dependency check
* Trigger CI
Co-authored-by: Sylvain Gugger <Sylvain.gugger@gmail.com>
2022-05-09 20:40:56 +05:30
Manan Dey
dc3645dc9c
add mobilebert
onnx configs ( #17029 )
...
* update docs of length_penalty
* Revert "update docs of length_penalty"
This reverts commit 466bf4800b
.
* add mobilebert onnx config
* address suggestions
* Update auto.mdx
* Update __init__.py
* Update features.py
2022-05-09 10:36:53 -04:00
robsmith155
a021f2b90c
Add type hints for BigBirdPegasus and Data2VecText PyTorch models ( #17123 )
...
* Add type hints for remaining BigBirdPegasus models
Here I added type hints to the BigBirdPegasusForCausalLM class.
* Add missing type hints for Data2VecText models
Added type hints to the Data2VecTextForCausalLM, Data2VecTextForMaskedLM,
Data2VecTextForMultipleChoice, Data2VecTextForQuestionAnswering,
Data2VecTextForSequenceClassification, and
Data2VecTextForTokenClassification classes.
2022-05-09 12:45:43 +01:00
ghlai9665
e9fd583ce0
LayoutLMv2Processor: ensure 1-to-1 mapping between images and samples in case of overflowing tokens ( #17092 )
...
* add get_overflowing_images function to ensure 1-to-1 mapping between samples and images in LayoutLMv2Processor
* make style
* add test for overflowing_tokens, change assert to ValueError, avoiding unrelated formatting changes
* change line length by passing --preview into black
2022-05-09 07:39:08 -04:00
Yih-Dar
3212afa614
split single_gpu and multi_gpu ( #17083 )
...
* split single_gpu and multi_gpu
* update needs in send_result
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-05-09 07:13:07 -04:00
Ritik Nandwal
215e0681e4
Added BigBirdPegasus onnx config ( #17104 )
...
* Add onnx configuration for bigbird-pegasus
* Modify docs
2022-05-06 17:31:00 +02:00
Yih-Dar
351cdbdfdc
Fix self-push CI report path in cat ( #17111 )
...
* fix report cat path
* fix report cat path
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-05-06 07:45:17 -07:00
Steven Liu
cad61b6839
Fix link to example scripts ( #17103 )
2022-05-05 15:20:27 -05:00
Yih-Dar
a59eb349c5
fix missing "models" in pipeline test module ( #17090 )
...
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-05-05 16:12:01 +02:00
Sylvain Gugger
dd16a113a4
Remove torchhub test ( #17097 )
2022-05-05 10:02:47 -04:00
Nicolas Brousse
c849a61e65
Fix MLflowCallback and add support for MLFLOW_EXPERIMENT_NAME ( #17091 )
...
* Fix use of mlflow.active_run() and add proper support for MLFLOW_EXPERIMENT_NAME
* Fix code style (make style)
2022-05-05 09:49:55 -04:00
robsmith155
99289c08a1
Add type hints for BERTGeneration ( #17047 )
...
Added type hints for the BERTGenerationEncoder and BERTGenerationDecoder
classes.
2022-05-05 12:22:46 +01:00
Robot Jelly
45360e1a8e
type hints for pytorch models ( #17064 )
...
* type hints for pytorch models
* fixed import error
* fixed some errors
2022-05-05 12:21:17 +01:00
Daniel Espejel
db377a0b37
Added spanish translation of autoclass_tutorial. ( #17069 )
...
* Added spanish translation of autoclass_tutorial.
Added 'local' and 'title' fields for autoclass_tutorial.
* Fixed autoclass_tutorial title in _toctree.yml and autoclass_tutorial.mdx
2022-05-04 14:18:24 -05:00
Yih-Dar
6dc4c36acb
minor change on TF Data2Vec test ( #17085 )
...
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-05-04 18:39:30 +02:00
Steven Liu
23619ef6b7
📝 open fresh PR for pipeline doctests ( #17073 )
2022-05-04 11:30:34 -05:00
Patrick Deutschmann
870e6f29a6
Fix DeBERTa token_type_ids
( #17082 )
2022-05-04 18:23:37 +02:00
Sean Moriarity
279bc5849b
Allow saved_model export of TFCLIPModel in save_pretrained ( #16886 )
...
* CLIP Serving
* Add type hints per code review
* Use black, flake8, and isort
* Update src/transformers/models/clip/modeling_tf_clip.py
Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>
* Rollback serving_output and add TODO
* Remove irrelevant portions of failing tests
* Revert "Rollback serving_output and add TODO"
This reverts commit a4abfa6ba3b7875a13538dbc2ddc4eb17dfcca8d.
* Rollback to original test/serving_output
* Fix unused var
* Apply suggestions from code review
* Update formatting with black
* Fix style again from rebase
* Update tests/models/clip/test_modeling_tf_clip.py
Co-authored-by: Yih-Dar <2521628+ydshieh@users.noreply.github.com>
Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>
Co-authored-by: Sean Moriarity <sean.l.moriarity.mil@army.mil>
Co-authored-by: Yih-Dar <2521628+ydshieh@users.noreply.github.com>
2022-05-04 16:37:58 +02:00
Zachary Mueller
ef20390291
Update to build via git for accelerate ( #17084 )
2022-05-04 09:42:36 -04:00
Sylvain Gugger
bb8d40529e
Deprecate model templates ( #17062 )
...
* Deprecate model templates
* Address review comments
2022-05-04 09:36:38 -04:00
karthikrangasai
9c5ae87f13
Type hint complete Albert model file. ( #16682 )
...
* Type hint complete Albert model file.
* Update typing.
* Update src/transformers/models/albert/modeling_albert.py
Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>
2022-05-04 14:35:12 +01:00
dependabot[bot]
2bf95e2b09
Bump notebook from 6.4.1 to 6.4.10 in /examples/research_projects/lxmert ( #16634 )
...
Bumps [notebook](http://jupyter.org ) from 6.4.1 to 6.4.10.
---
updated-dependencies:
- dependency-name: notebook
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-04 08:27:40 -04:00
dependabot[bot]
7a229ef446
Bump notebook in /examples/research_projects/visual_bert ( #16635 )
...
Bumps [notebook](http://jupyter.org ) from 6.4.1 to 6.4.10.
---
updated-dependencies:
- dependency-name: notebook
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-04 08:27:27 -04:00
Sayak Paul
049e791758
Add Data2Vec for Vision in TF ( #17008 )
...
* add utilities till TFData2VecVisionLayer.
* chore: pass window_size to attention layer.
* feat: add TFData2VecVisionRelativePositionBias.
* feat: initial implementation ready for tf data2vec.
* fix: relative position bias index, table to be fixed.
* chore: implementation added, tests remaining.
* add: tests, other PR files.
* fix: code quality.
* fix: import structure in init.
* chore: run make fix-copies.
* chore: address PR feedback (round I).
* chore: styling nit.
* fix: tests due to removal of to_2tuple().
* chore: rebase with upstream main and move the test.
* Update src/transformers/models/auto/modeling_tf_auto.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/models/auto/modeling_tf_auto.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* fix: layer call.
* chore: remove from_pt=True and rerun test.
* chore: remove cast and tf.divide.
* chore: minor edits to the test script.
* Update src/transformers/models/data2vec/modeling_tf_data2vec_vision.py
Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>
* fix: expand() on TF tensors with broadcast_to().
* fix: test import.
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>
2022-05-04 08:08:25 -04:00
Sylvain Gugger
d76d2a2af7
Make sure telemetry arguments are not returned as unused kwargs ( #17063 )
...
* Make sure telemetry arguments are not returned as unused kwargs
* Fix test
2022-05-04 07:47:57 -04:00
lewtun
675e2d1663
Remove masked image modeling from BEIT ONNX export ( #16980 )
...
* Add masked image modelling to task mapping
* Refactor ONNX features to be listed alphabetically
* Add warning about BEiT masked image modeling
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-05-04 10:05:24 +02:00
lewtun
4bb1d0ec84
Skip RoFormer ONNX test if rjieba not installed ( #16981 )
...
* Skip RoFormer ONNX test if rjieba not installed
* Update deps table
* Skip RoFormer serialization test
* Fix RoFormer vocab
* Add rjieba to CircleCI
2022-05-04 10:04:10 +02:00
Thomas Wang
db034660fb
Fix hashing for deduplication ( #17048 )
2022-05-04 08:40:24 +02:00
Pavel Belevich
39f8eafc1b
Remove device parameter from create_extended_attention_mask_for_decoder ( #16894 )
2022-05-03 11:06:11 -04:00
Sylvain Gugger
dd739f7045
Remove fetch in model templates test
2022-05-03 10:49:12 -04:00
Sylvain Gugger
1c9fcd0e04
Fix RNG reload in resume training from epoch checkpoint ( #17055 )
...
* Fix RNG reload in resume training from epoch checkpoint
* Fix test
2022-05-03 10:31:24 -04:00
Sylvain Gugger
6e17ba6aa5
Remove Python and use v2 action ( #17059 )
2022-05-03 10:12:17 -04:00
Sylvain Gugger
a8fa2f91f4
Make Trainer compatible with sharded checkpoints ( #17053 )
...
* Make Trainer compatible with sharded checkpoints
* Add doc
2022-05-03 09:55:10 -04:00
Yih-Dar
19420fd99e
Move test model folders ( #17034 )
...
* move test model folders (TODO: fix imports and others)
* fix (potentially partially) imports (in model test modules)
* fix (potentially partially) imports (in tokenization test modules)
* fix (potentially partially) imports (in feature extraction test modules)
* fix import utils.test_modeling_tf_core
* fix path ../fixtures/
* fix imports about generation.test_generation_flax_utils
* fix more imports
* fix fixture path
* fix get_test_dir
* update module_to_test_file
* fix get_tests_dir from wrong transformers.utils
* update config.yml (CircleCI)
* fix style
* remove missing imports
* update new model script
* update check_repo
* update SPECIAL_MODULE_TO_TEST_MAP
* fix style
* add __init__
* update self-scheduled
* fix add_new_model scripts
* check one way to get location back
* python setup.py build install
* fix import in test auto
* update self-scheduled.yml
* update slack notification script
* Add comments about artifact names
* fix for yolos
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-05-03 14:42:02 +02:00
Sanchit Gandhi
cd9274d010
[FlaxBert] Add ForCausalLM ( #16995 )
...
* [FlaxBert] Add ForCausalLM
* make style
* fix output attentions
* Add RobertaForCausalLM
* remove comment
* fix fx-to-pt model loading
* remove comment
* add modeling tests
* add enc-dec model tests
* add big_bird
* add electra
* make style
* make repo-consitency
* add to docs
* remove roberta test
* quality
* amend cookiecutter
* fix attention_mask bug in flax bert model tester
* tighten pt-fx thresholds to 1e-5
* add 'copied from' statements
* amend 'copied from' statements
* amend 'copied from' statements
* quality
2022-05-03 11:26:19 +02:00
Patrick von Platen
31616b8d61
[T5 Tokenizer] Model has no fixed position ids - there is no hardcode… ( #16990 )
...
* [T5 Tokenizer] Model has no fixed position ids - there is no hardcoded max length
* [T5 Tokenizer] Model has no fixed position ids - there is no hardcoded max length
* correct t5 tokenizer
* correct t5 tokenizer
* fix test
* Apply suggestions from code review
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* finish
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-05-02 21:27:34 +02:00
Sylvain Gugger
1073f00d4e
Clean up setup.py ( #17045 )
...
* Clean up setup.py
* Trigger CI
* Upgrade Python used
2022-05-02 12:58:17 -04:00
Lysandre Debut
30ca529902
Make the sacremoses dependency optional ( #17049 )
...
* Make sacremoses optional
* Pickle
2022-05-02 12:47:47 -04:00
Lysandre Debut
bb2e088be7
Allow all imports from transformers ( #17050 )
2022-05-02 12:47:39 -04:00
NielsRogge
1ac698744c
Add YOLOS ( #16848 )
...
* First draft
* Add YolosForObjectDetection
* Make forward pass work
* Add mid position embeddings
* Add interpolation of position encodings
* Add expected values
* Add YOLOS to tests
* Add integration test
* Support tiny model as well
* Support all models in conversion script
* Remove mid_pe_size attribute
* Make more tests pass
* Add model to README and fix config
* Add copied from statements
* Rename base_model_prefix to vit
* Add missing YOLOS_PRETRAINED_CONFIG_ARCHIVE_MAP
* Apply suggestions from code review
* Apply more suggestions from code review
* Convert remaining checkpoints
* Improve docstrings
* Add YolosFeatureExtractor
* Add feature extractor to docs
* Add corresponding tests
* Fix style
* Fix docs
* Apply suggestion from code review
* Fix bad rebase
* Fix some more bad rebase
* Fix missing character
* Improve docs and variable names
Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
2022-05-02 18:30:55 +02:00
Zachary Mueller
f275e593bf
Fix no_trainer examples to properly calculate the number of samples ( #17046 )
...
* Update all examples to properly calculate progress bar
2022-05-02 11:56:25 -04:00
Zachary Mueller
35d48db881
Update no_trainer examples to use new logger ( #17044 )
...
* Propagate and fix imports
2022-05-02 11:56:15 -04:00
calpt
daecae1f1c
[Trainer] Move logic for checkpoint loading into separate methods for easy overriding ( #17043 )
2022-05-02 10:40:37 -04:00
NielsRogge
2de2c9ecca
Clean up vision tests ( #17024 )
...
* Clean up tests
* Make fixup
Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
2022-05-02 16:28:58 +02:00
Sylvain Gugger
4be8b95a9f
Disable Flax GPU tests on push ( #17042 )
2022-05-02 10:25:53 -04:00
yujun
bdd690a74d
add torch.no_grad when in eval mode ( #17020 )
...
* add torch.no_grad when in eval mode
* make style quality
2022-05-02 07:49:19 -04:00
Martin Pömsl
9586e222af
Fix typo in RetriBERT docstring ( #17018 )
2022-05-02 07:48:20 -04:00
Sanchit Gandhi
93b802c43e
[Flax(Speech)EncoderDecoder] Fix bug in decoder_module
( #17036 )
...
* [FlaxSpeechEncoderDecoder] Fix bug in `decoder_module`
* [FlaxEncoderDecoder] Fix bug in `decoder_module`
2022-05-02 13:06:45 +02:00
Sylvain Gugger
1ae182d9a6
Fix style
2022-05-02 06:19:31 -04:00