Commit Graph

15053 Commits

Author SHA1 Message Date
Partho
339c5a5d9a
[Doctest] Add configuration_data2vec_text.py (#19636)
* Data2Vec Text Config for doctest

* typo fix

* made suggested changes
2022-10-17 10:34:33 +02:00
AymenBer99
dd464e22a7
[Doctest] CodeGen config for doctest (#19633) 2022-10-15 12:35:35 +02:00
Sylvain Gugger
3e4900208a
Tokenizer from_pretrained should not use local files named like tokenizer files (#19626) 2022-10-14 14:06:56 -04:00
Sujay
8fcf562603
[Doctest] Add configuration_time_series_transformer.py (#19582)
* initial changes

* update the suggested order of import
2022-10-14 19:39:56 +02:00
Sujay
31cfe9c429
[Doctest] Add configuration_vision_encoder_decoder.py (#19583)
* adds vision_encoder_decoder to Doc tests

* keep the initial order
2022-10-14 19:30:14 +02:00
Sujay
7972f995b3
[Doctest] Add configuration_vision_text_dual_encoder.py (#19580)
* initial commit

* few suggested changes
2022-10-14 18:45:15 +02:00
Arthur
2bd2de62c9
Sharding fails in TF when absolute scope was modified if . in layer name (#19124)
* simplify loop

* fix layer map split

* update

* update for special variables

* add rag test

* fixup

* revert change : for next PR
2022-10-14 18:34:33 +02:00
Arthur
614f7d28a8
Fix whisper doc (#19608)
* update feature extractor params

* update attention mask handling

* fix doc and pipeline test

* add warning when skipping test

* add whisper translation and transcription test

* fix build doc test

* Correct whisper processor

* make fix copies

* remove sample docstring as it does not fit whisper model

* Update src/transformers/models/whisper/modeling_whisper.py

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

* fix, doctests are passing

* Nit

* last nit

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-10-14 18:12:32 +02:00
Partho
66dd80213c
[Doctest] Add configuration_resnet.py (#19620)
* ResNet Config for doctest

* added empty lines as suggested

* ran make style
2022-10-14 18:10:17 +02:00
Sanchit Gandhi
4e196df8c4
[Whisper] Fix gradient checkpointing (again!) (#19548)
* [Whisper] Fix gradient checkpointing (again!)

* [Whisper] Fix checkpointing (again!)
2022-10-14 17:08:36 +01:00
Partho
585f9c6d9e
[Doctest] DistilBERT Config for doctest (#19621) 2022-10-14 17:22:29 +02:00
Partho
96f243c399
[Doctest] LeViT Config for doctest (#19622) 2022-10-14 17:21:24 +02:00
Nicolas Patry
463226e2ee
Improve error messaging for ASR pipeline. (#19570)
* Improve error messaging for ASR pipeline.

- Raise error early (in `_sanitize`) so users don't waste time trying to
  run queries with invalid params.

- Fix the error was after using `config.inputs_to_logits_ratio` so our
  check was masked by the failing property does not exist.

- Added some manual check on s2t for the error message.
  No non ctc model seems to be used by the default runner (they are all
  skipped).

* Removing pdb.

* Stop the early error it doesn't really work :(.
2022-10-14 17:12:21 +02:00
0xflotus
5ef2186692
fix: small error (#19612)
* fix: small error

* fix: another typo error
2022-10-14 11:10:33 -04:00
Jing Hua
78c1e7d253
xlm roberta xl config for doctest (#19610)
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-10-14 11:04:10 -04:00
Jing Hua
10ea45b902
Ernie config for doctest (#19611) 2022-10-14 10:57:51 -04:00
Jing Hua
637af90d7f
xlm roberta config for doctest (#19609) 2022-10-14 10:48:38 -04:00
RamitPahwa
2d4572b5c9
GPTTokenizer dependency removed from deberta class (#19551)
* GPTTOkenizer dependency removed from deberta class

Fixup

made the Deberta Tokenizer fast independent of GPT-2 tokenizer

Copied annotation added

Done the dependency removal

* Added some missing copied statement

* Added some copied statements
2022-10-14 10:46:38 -04:00
Jing Hua
f8244014a5
Visual Bert config for doctest (#19605) 2022-10-14 10:45:37 -04:00
Yih-Dar
db94b746db
Fix FlaubertTokenizer (#19552)
* fix flaubert tokenizer

* update

* update

* Final cleanup

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-10-14 16:31:01 +02:00
Yih-Dar
62f28bc152
Fix ImageToTextPipelineTests.test_small_model_tf (#19565)
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-10-14 16:29:54 +02:00
Wang, Yi
e82c1cb78e
add gloo backend support for CPU DDP (#19555)
Signed-off-by: Wang, Yi A <yi.a.wang@intel.com>

Signed-off-by: Wang, Yi A <yi.a.wang@intel.com>
2022-10-14 10:18:16 -04:00
Pi Esposito
0e0b7cb72a
Allow usage of TF Text BertTokenizer on TFBertTokenizer to make it servable on TF Serving (#19590)
* add suport for non fast tf bert tokenizer

* add tests for non fast tf bert tokenizer

* fix fast bert tf tokenizer flag

* double tokenizers list on tf tokenizers test to aovid breaking zip on test output equivalence

* reformat code with black to comply with code quality checks

* trigger ci
2022-10-14 15:18:02 +01:00
Yih-Dar
59b7334c87
Fix test_tf_encode_plus_sent_to_model for TAPAS (#19559)
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-10-14 16:10:36 +02:00
Nouamane Tazi
1967be98fa
fix BLOOM ONNX config (#19573)
* fix BLOOM ONNX config
- `value` params have `seq_len` as their 2nd axe as opposed to other models which have it as 3rd

Co-authored-by: lewtun <lewis.c.tunstall@gmail.com>
2022-10-14 16:04:48 +02:00
NielsRogge
4f0337a08f
[Time Series Transformer] Add doc tests (#19607)
* Add doc tests

* Make it more consistent

Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
2022-10-14 15:57:03 +02:00
Sanchit Gandhi
c937f0b954
[Whisper] Don't return attention mask in feat extractor (#19521)
* [Whisper] Don't return attention mask in feat extractor

* remove attention mask from test

* fix failing tests

* quality
2022-10-14 14:36:03 +01:00
amyeroberts
83a2e694f1
Cast masks to np.unit8 before converting to PIL.Image.Image (#19616)
* Cast masks to np.unit8 before converting to PIL.Image.Image

* Update tests

* Fixup
2022-10-14 09:30:45 -04:00
Xabier Lahuerta Vazquez
909f07092a
[Doctest] Add configuration_bigbird_pegasus.py and configuration_big_bird.py (#19606)
* [Doctest] Add `configuration_bigbird_pegasus.py` and `configuration_big_bird`

[Doctest] Re-style `configuration_big_bird.py`

* [Doctest] One python instruction per line

* [Doctest] Fix styling

* [Doctest] More styling fixes
2022-10-14 15:17:36 +02:00
Thomas
6deac5c824
Adding type hints for TFXLnet (#19344)
* Added type hints for TF: XLNet

* Added type hints for TF: XLNet

* Added type hints for TF: XLNet

* Added type hints for TF: XLNet

* Added type hints for TF: XLNet

* Added type hints for TF: XLNet

* Add type hints for XLnet (TF)
* Added type hints for XLnet (TF)

* Update src/transformers/models/xlnet/modeling_tf_xlnet.py
2022-10-14 12:28:08 +01:00
RamitPahwa
7036c956fe
[Doctest] fix doc test for megatron bert (#19600) 2022-10-14 12:08:55 +02:00
Partho
c7d1fb6964
[Doctest] SEW-D Config for doctest (#19598) 2022-10-14 12:07:32 +02:00
Partho
0ac6b90563
[Doctest] UniSpeech Config for doctest (#19596) 2022-10-14 12:03:35 +02:00
Partho
71a27e3952
[Doctest] SEW Config for doctest (#19597) 2022-10-14 11:47:29 +02:00
Partho
e64798296f
[Doctest] Swin Config for doctest (#19594) 2022-10-14 11:37:37 +02:00
Partho
7178b29a8e
[Doctest] Swin V2 Config for doctest (#19595) 2022-10-14 11:16:38 +02:00
KaranGarg
76b4239ec8
[Doctests] add configuration_blenderbot_small.py (#19589)
* yoso config for doctest

* Revert "yoso config for doctest"

This reverts commit eae128d6f1.

* add configurations_blenderbot_small.py for doctests
2022-10-14 09:42:29 +02:00
Sujay
3d320c78c3
[Doctest] adds trajectory_transformer config to Docs test (#19586) 2022-10-13 19:07:10 +02:00
KaranGarg
1f6a28c71c
[Doctests] add configuration_blenderbot.py (#19577)
* yoso config for doctest

* Revert "yoso config for doctest"

This reverts commit eae128d6f1.

* add configurations.blenderbot.py for doctests

* add configuration.blenderbot for doctest
2022-10-13 18:46:12 +02:00
Emmanuel Lusenji
f06a6f7e37
[WIP] Add type hints for Lxmert (TF) (#19441)
* Add type hints for Lxmert (TF)

* Update src/transformers/models/lxmert/modeling_tf_lxmert.py

Co-authored-by: Emmanuel Lusenji <elusenji@Emmanuels-MacBook-Pro.local>
Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>
2022-10-13 15:53:27 +01:00
IMvision12
036e808517
Added type hints to DebertaV2ForMultipleChoice Pytorch (#19536)
* Update modeling_deberta_v2.py

* Update modeling_deberta_v2.py
2022-10-13 14:52:43 +01:00
KaranGarg
7180e17256
[Doctests] Config files for ViTMAE and YOSO (#19567) 2022-10-13 15:05:02 +02:00
Isaac Omolayo
05a287ec1a
[Doctest] Add configuration_canine.py (#19575) 2022-10-13 14:12:49 +02:00
imarekkus
117098421c
[Doctest] CTRL config (#19574) 2022-10-13 14:10:04 +02:00
heatz123
0e83c9664b
Fix fairseq wav2vec2-xls-r pretrained weights conversion scripts (#19508)
* fix loading fairseq wav2vec2 pretrained weights

Specified fairseq task as "audio_pretraining" when loading fairseq weights,
since loading wav2vec2-xls-r weights fails if the task is unspecified.

Resolves: #19319

* fix style
2022-10-13 11:48:42 +01:00
Duong A. Nguyen
4212bb0d60
[Re-submit] Compute true loss Flax examples (#19504)
* Compute true loss

* fixup

* final

* final

* final

* Update examples/flax/language-modeling/run_bart_dlm_flax.py

Co-authored-by: Sanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>

* jax.tree_map => jax.tree_util.tree_map

* Compute true loss

* final

* fixup

* final

* final

* Update examples/flax/language-modeling/run_bart_dlm_flax.py

Co-authored-by: Sanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>

* jax.tree_map => jax.tree_util.tree_map

Co-authored-by: Sanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
2022-10-13 11:33:36 +01:00
imarekkus
0903fc80b5
[Doctest] bloom config update (#19566) 2022-10-13 12:14:38 +02:00
Partho
0ae3ec5b9d
[Doctest] Add configuration_vit.py (#19561)
* ViT Config for doctest
2022-10-13 12:07:14 +02:00
Partho
f173ceefc0
[Doctest] RoBERTa Config for doctest (#19563) 2022-10-13 12:06:18 +02:00
Partho
2719599a22
[Doctest] Reformer Config for doctest (#19562) 2022-10-13 12:03:15 +02:00