Commit Graph

11235 Commits

Author SHA1 Message Date
Partho 506355ca75
[Doctest] SpeechToTextTransformer2 Config for doctest (#19756) 2022-10-20 10:19:06 +02:00
Partho 123f65eea6
[Doctest] SqueezeBERT Config for doctest (#19758) 2022-10-20 10:16:39 +02:00
Partho cc03063366
[Doctest] SpeechToTextTransformer Config for doctest (#19757) 2022-10-20 10:15:07 +02:00
Mohammed Faizan Ahmed bbe2c8b126
All broken links were fixed in contributing file (#19760) 2022-10-19 16:44:03 -04:00
shreya24ag 5602a3ae1e
Fixed spacing errors (#19754)
Co-authored-by: Shreya <>
2022-10-19 14:54:30 -04:00
Xabier Lahuerta Vazquez 0a03741590
[Doctest] Add `configuration_detr.py` (#19752) 2022-10-19 18:13:34 +02:00
Xabier Lahuerta Vazquez 65d36ee861
[Doctest] Add `configuration_decision_transformer.py` (#19751) 2022-10-19 18:12:34 +02:00
amyeroberts 5041bc3511
Image transforms add center crop (#19718)
* Add center crop to transforms library

* Return PIL images if PIL image input by default

* Fixup and add docstring

* Trigger CI

* Update src/transformers/image_transforms.py

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

* Update src/transformers/image_transforms.py

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

* PR comments - move comments; unindent

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-10-19 16:15:01 +01:00
Sylvain Gugger 44a40c1466
Fix cache version file creation (#19750) 2022-10-19 10:55:57 -04:00
Yih-Dar bed2edb99f
Specify TF framework explicitly in more pipeline tests (#19748)
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-10-19 16:24:03 +02:00
JuanCarlosPi c206fc8779
[Doctest] Add `configuration_wavlm.py` (#19749)
* Change the import order of the model and configuration classes

* Add (with random weights) in the comment before model initialization

* Add configuration_wavlm to doctest
2022-10-19 16:10:13 +02:00
raghavanone b17a5e0074
Fix issue #19300 (#19483)
* Fix issue #19300

* Fixing import order

* Fix issue #19300

* Fix formatting issues

* Update src/transformers/trainer.py

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

* Refactor method

* Refactor method

* Fix the issue of sending wrong output dir

* Remove unused code

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-10-19 09:55:37 -04:00
IMvision12 d2ed8134f1
Update modeling_markuplm.py (#19723) 2022-10-19 13:46:11 +01:00
Rohith ND 7df0751cc6
[Doctest] GPTNeoConfig , GPTNeoXConfig , GPTNeoXJapaneseConfig (#19741) 2022-10-19 14:22:41 +02:00
GMFTBY 71786b10c5
Adding the state-of-the-art contrastive search decoding methods for the codebase of generation_utils.py (#19477)
* add: the contrastive search for generaton_utils

* add: testing scripts for contrastive search under examples/text-generation

* update the quality of codes

* revise the docstring; make the generation_contrastive_search.py scripts;

* revise the examples/pytorch/text-generation/run_generation_contrastive_search.py to the auto-APIs format

* revise the necessary documents

* fix: revise the docstring of generation_contrastive_search.py

* Fix the code indentation

* fix: revise the nits and examples in contrastive_search docstring.

* fix the copyright

* delete generation_contrastive_search.py

* revise the logic in contrastive_search

* update the intergration test and the docstring

* run the tests over

* add the slow decorate to the contrastive_search intergrate test

* add more test

* do the style, quality, consistency checks
2022-10-19 10:17:46 +01:00
Partho fc5fdc109d
[Doctest] Add `configuration_clip.py` (#19647)
* CLIP Config for doctest

* add doc example to CLIPConfig

* add from_text_vision_configs example

* added comment explaining objective
2022-10-19 09:51:26 +02:00
AymenBer99 c9a0da1e12
[Doctest] XLM Config for doctest (#19685) 2022-10-19 07:10:30 +02:00
JuanCarlosPi eccbdbcd4d
[Doctest] Add wav2vec2_conformer for doctest (#19734) 2022-10-19 06:47:41 +02:00
Steven Liu 32670805fc
Update contribution guide (#19700)
* update the contribution guide

* apply review feedback

* fix checkboxes

* checkbox fix #2

* clarify force push
2022-10-18 17:20:12 -07:00
Sylvain Gugger ebee0a2794
Remove debug statement 2022-10-18 13:58:09 -04:00
Rohith ND fa8ed9ca76
[Doctest] Add doctest for `FlavaConfig` and `FNetConfig` (#19724) 2022-10-18 19:56:49 +02:00
amyeroberts 31ec424b3d
Add decorator to flaky test (#19674) 2022-10-18 18:51:37 +01:00
Sylvain Gugger a929f81e92
Repo utils test (#19696)
* Create repo utils test job

* Last occurence

* Add tests for tests_fetcher

* Better filtering

* Let's learn more

* Should fix

* Should fix

* Remove debug

* Style

* WiP

WiP

WiP

WiP

WiP

WiP

WiP

WiP

WiP

* Quality

* address review comments

* Fix link
2022-10-18 13:47:36 -04:00
David Yang a23819ed6a
Clean up deprecation warnings (#19654)
* Clean up deprecation warnings

Notes:
Changed some strings in tests to raw strings, which will change the literal content of the strings as they are fed into whatever machine handles them.
Test cases for past in the past/past_key_values switch changed/removed due to warning of impending removal

* Add PILImageResampling abstraction for PIL.Image.Resampling
2022-10-18 13:34:47 -04:00
Younes Belkada af556a09f6
add `accelerate` support for `Whisper` (#19697) 2022-10-18 18:25:49 +02:00
Sylvain Gugger fb0bd7b7a8
Fix activations being all the same module (#19728) 2022-10-18 11:56:45 -04:00
NielsRogge 14fe3e0410
Add docs (#19729)
Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
2022-10-18 17:42:46 +02:00
Yih-Dar 06a82a49ae
Specify TF framework in TF-related pipeline tests (#19719)
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-10-18 17:40:28 +02:00
Mukesh K f3ed26a3fb
[Doctest] Fixing doctest `configuration_pegasus_x.py` (#19725)
* Fixed pegasus_x config doctest

* Test commit

Co-authored-by: mukesh663 <mukesh13034@gmail.com>
2022-10-18 17:19:31 +02:00
Somasree Majumder 5864051109
[Doctest] Adding config files for convnext (#19717)
* Adding config files for configuration_clip.py

* Adding config files for convnext

* Undoing

* making the required changes

* Update documentation_tests.txt
2022-10-18 17:10:09 +02:00
Nicolas Patry 63d13d768b
Improving `image-segmentation` pipeline tests. (#19710)
This PR (https://github.com/huggingface/transformers/pull/19367) introduced a few breaking changes:

- Removed an argument `mask_threshold`.
- Broke the default behavior (instance vs panoptic in the function call)
  https://github.com/huggingface/transformers/pull/19367/files#diff-60f846b86fb6a21d4caf60f5b3d593a04accb8f248de3029cccae2ff898c5bc3R119-R120
- Broke the actual masks: https://github.com/huggingface/transformers/pull/1961

This PR is the start of a handful that will aim at bringing back the old
behavior(s).

- tests should not have to specify `task` by default, unless we want to
  modify the behavior and have a lower form of segmentation running)
- `test_small_model_pt` should be working.

This specific PR starts with adding more information to the masks hash
because missing the actual mask was actual easy to miss (the hashes do
change, but it was easy to miss that one code path wasn't properly
updated).

So we go from a simple `hash` to
```
{"hash": #smaller hash, "shape": (h, w), "white_pixels": n}
```

The `shape` should help make sure the interpolation of the mask works
correctly, the `white_pixels` hopefully helps detect big regressions in
their amount when the hash gets modified.
2022-10-18 16:33:53 +02:00
Nicolas Patry ee2a80ecc0
add return_tensors parameter for feature_extraction 2 (#19707)
* add return_tensors parameter for feature_extraction  w/ test

add return_tensor parameter for feature extraction

Revert "Merge branch 'feature-extraction-return-tensor' of https://github.com/ajsanjoaquin/transformers into feature-extraction-return-tensor"

This reverts commit d559da743b87914e111a84a98ba6dbb70d08ad88, reversing
changes made to bbef89278650c04c090beb65637a8e9572dba222.

call parameter directly

Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>

Fixup.

Update src/transformers/pipelines/feature_extraction.py

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

* Fix the imports.

* Fixing the test by not overflowing the model capacity.

Co-authored-by: AJ San Joaquin <ajsanjoaquin@gmail.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-10-18 16:29:00 +02:00
Ivan Sedykh 02b63702d9
fix seq2seqtrainer predict without labels (#19721) 2022-10-18 09:42:15 -04:00
Mukesh K fac1f4b188
]Fixed pegasus config doctest (#19722)
Co-authored-by: mukesh663 <mukesh13034@gmail.com>
2022-10-18 15:38:57 +02:00
NielsRogge dd523da577
Add table transformer [v2] (#19614)
* First draft

* Add conversion script

* Make conversion work

* Upload checkpoints

* Add final fixes

* Revert changes of conditional and deformable detr

* Fix toctree, add and remove copied from

* Use model type

* Improve docs

* Improve code example

* Update copies

* Add copied formt

* Don't update conditional detr

* Don't update deformable detr
2022-10-18 15:20:09 +02:00
Nicolas Patry 713eab45d3
🚨 🚨 🚨 [Breaking change] Deformable DETR intermediate representations (#19678)
* [Breaking change] Deformable DETR intermediate representations

- Fixes naturally the `object-detection` pipeline.
- Moves from `[n_decoders, batch_size, ...]` to `[batch_size,
  n_decoders, ...]` instead.

* 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>
2022-10-18 09:00:39 -04:00
JuanCarlosPi fd99ce3329
[Doctest] Add configuration_wav2vec2.py to documentation_tests.py (#19698) 2022-10-18 14:57:34 +02:00
AymenBer99 8fcbbd3d53
[Doctest] CVT config for doctest (#19695) 2022-10-18 14:55:56 +02:00
Antonio Carlos Falcão Petri af150e4a1c
Allow user-managed Pool in Wav2Vec2ProcessorWithLM.batch_decode (#18351)
* [Wav2Vec2] Allow user-managed Pool in Wav2Vec2ProcessorWithLM.batch_decode

* [Wav2Vec2] Add user-managed LM's pool tests and usage examples

* Improve styling

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

* [Wav2Vec2] Fix hyperlink references

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-10-18 08:48:03 -04:00
Alara Dirik bf0e094142
Fix redundant normalization of OWL-ViT text embeddings (#19712) 2022-10-18 15:15:36 +03:00
Christopher Akiki 71ca79448c
Fix typo in perf docs (#19705) 2022-10-18 12:18:19 +02:00
Matt fd5eac5f71
Small fixes for TF-ESM1b and ESM-1b weight conversions (#19683) 2022-10-18 10:41:09 +01:00
NielsRogge 90071fe42b
Improve DETR models (#19644)
* Improve DETR models

* Fix Deformable DETR loss and matcher

* Fixup

* Fix integration tests

* Improve variable names

* Apply suggestion

* Fix copies

* Fix DeformableDetrLoss

* Make Conditional DETR copy from Deformable DETR

* Copy from deformable detr's hungarian matcher

* Fix bug
2022-10-18 10:29:14 +02:00
Arthur 072dfdaee4
update documentation (#19706) 2022-10-18 10:07:15 +02:00
NielsRogge fd9a027aca
Fix docs (#19687)
Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
2022-10-18 09:52:51 +02:00
Arthur 3e07196f89
check decoder_inputs_embeds is None before shifting labels (#19671) 2022-10-18 09:14:12 +02:00
Arthur d356b89f3c
fix test whisper with new max length (#19668) 2022-10-18 08:56:37 +02:00
Arthur d51ca32404
fix tests (#19670) 2022-10-18 06:45:48 +02:00
Sylvain Gugger 344e2664d4
Fix dtype in radnomly initialized head (#19690) 2022-10-17 15:54:23 -04:00
Yih-Dar 07f6690206
Fix checkpoint used in `VisualBertConfig` doc example (#19692)
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-10-17 21:22:59 +02:00