Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update with forked from #1

Merged
merged 956 commits into from
Mar 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
956 commits
Select commit Hold shift + click to select a range
36a6a1a
Fix 2 quicktour file doctest (#21742)
ydshieh Feb 23, 2023
78a93d1
[`GPTNeo`] Fix gradient checkpointing bug (#21733)
younesbelkada Feb 23, 2023
1d4b797
Generate: Fix GIT batched captioning (#21738)
gante Feb 23, 2023
aa3787c
Skip test_log_level for now
ydshieh Feb 23, 2023
0ffa22f
Added Type Hints for modeling_tf_encoder_decoder.py (#21673)
Batese2001 Feb 23, 2023
04d90ac
Auto api Value Error addition to Troubleshoot (#21708)
MKhalusova Feb 23, 2023
6330626
[deepspeed tests] fix issues introduced by #21700 (#21769)
stas00 Feb 23, 2023
4446b6b
Graphormer fix (#21699)
clefourrier Feb 24, 2023
279008a
fix: Change is_last chunk calc and add conditional break in chunk_ite…
Feb 24, 2023
f7ca656
[Flax] adding support for batch norm layers (#21581)
Shubhamai Feb 24, 2023
1348924
[Examples] Generalise run audio classification for log-mel models (#2…
sanchit-gandhi Feb 24, 2023
14f3320
Different behavior in DistilBERT when using "inputs_embeds" (#21752)
ArthurZucker Feb 24, 2023
75bd49f
[Flax] Fix erroneous kwargs being passed to generate config (#21765)
sanchit-gandhi Feb 24, 2023
c8545d2
[Whisper] Add SpecAugment (#21298)
bofenghuang Feb 24, 2023
087436c
Fix-ci-whisper (#21767)
ArthurZucker Feb 24, 2023
440f397
Generate - update cookie cutters to not initialize cache with trainin…
gante Feb 24, 2023
ba0e370
[time series] updated expected values for integration test. (#21762)
kashif Feb 24, 2023
59c1d5b
[GPT2, ProphetNet] Fix gradient checkpointing bug (#21772)
yhl48 Feb 24, 2023
3dae0d7
[SpeechT5] Fix HiFiGAN tests (#21788)
sanchit-gandhi Feb 24, 2023
9ddf4f4
Fix resume_from_checkpoint for deepspeed (#21735)
mosheber Feb 25, 2023
3c0ce60
[examples/summarization] deal with `max_length` and `num_beams` (#21740)
bofenghuang Feb 27, 2023
a369836
Fix type in gpt2 config docstring (#21782)
WeberJulian Feb 27, 2023
ba2a5f1
Fix en documentation typos (#21799)
tpaviot Feb 27, 2023
2ea1ef9
[FX tracer] Make `concrete_args` from outside available (#21775)
lygztq Feb 27, 2023
cc44e72
[Pipeline] Add zero shot audio classificatoin pipeline (#21600)
ArthurZucker Feb 27, 2023
c51dc4f
[torch] remove deprecated uint8 in favor of bool (#21384)
ArthurZucker Feb 27, 2023
831f314
[`tests`] add `accelerate` marker (#21743)
younesbelkada Feb 27, 2023
ebf84f0
Fix PyTorch Perceiver `PerceiverFourierPositionEncoding` with fp16 (#…
fxmarty Feb 27, 2023
0c7f93f
Fix nn.init.trunc_normal_ call on torch.float16 data (#21789)
fxmarty Feb 27, 2023
7811bf7
Fix gradient checkpointing bug in gptneox (#21815)
KMFODA Feb 27, 2023
92dfceb
Inheritance-based framework detection (#21784)
gante Feb 27, 2023
f95f60c
Fix quality with `ruff==0.0.253` (#21828)
ydshieh Feb 27, 2023
c7f3abc
introduce `logger.warning_once` and use it for grad checkpointing cod…
stas00 Feb 27, 2023
a9dd124
Rename `MobileViTModelTest` to `TFMobileViTModelTest` (#21825)
ydshieh Feb 28, 2023
50644cf
Fix gradient checkpointing bug BioGpt (#21844)
saswatmeher Feb 28, 2023
50db741
check for None forced tokens (#21793)
andyehrenberg Feb 28, 2023
e07a3d9
Fix gradient checkpointing bug in git (#21818)
KMFODA Feb 28, 2023
4fe744f
Fix gradient checkpointing imagegpt (#21816)
KMFODA Feb 28, 2023
2d506ea
Fix tf random token masking probability in data collator (#21834)
anruijian Feb 28, 2023
ae9230a
[`T5`] Fix torchquant issue (#21843)
younesbelkada Feb 28, 2023
b8de7e4
[`Blip2`] Add `Blip2Model` (#21817)
younesbelkada Feb 28, 2023
eec7604
Fix the issue of blip model returning loss even when the label is not…
raghavanone Feb 28, 2023
31fa2b6
[GPTJ] Fix gradient checkpointing bug (#21794)
krypticmouse Feb 28, 2023
6ca8445
Add: task guide for zero shot object detection (#21829)
MKhalusova Feb 28, 2023
aab895c
Make Slack CI reporting stronger (#21823)
ydshieh Feb 28, 2023
7f4f8b9
[`Blip2`] Fix Blip-2 multi gpu (#21707)
younesbelkada Feb 28, 2023
4cb5ffa
Add loss for BridgeTowerForMaskedLM and BridgeTowerForImageAndTextRet…
abhiwand Feb 28, 2023
871c31a
🔥Rework pipeline testing by removing `PipelineTestCaseMeta` 🚀 (#21516)
ydshieh Feb 28, 2023
acfb714
Improve TF weight loading, especially PT crossloading (#21792)
Rocketknight1 Feb 28, 2023
b29e2dc
Fix flaky test for log level (#21776)
sgugger Feb 28, 2023
44e3e3f
prepare for "__floordiv__ is deprecated and its behavior will change…
ArthurZucker Mar 1, 2023
b599b19
[ConvBert] Fix #21523 (#21849)
ArthurZucker Mar 1, 2023
5e6cd51
Flax beam search fix (#21857)
andyehrenberg Mar 1, 2023
72e9ca7
Fix gradient checkpointing bug Bart (#21866)
saswatmeher Mar 1, 2023
f71873c
[deepspeed] check whether model is NLP one instead of counting on inp…
izapolsk Mar 1, 2023
ebd5258
Change the way tensor is reshaped in BartAttention (from .view to .re…
raghavanone Mar 1, 2023
619d831
Italian translation of community.mdx (#21871)
lorenzobalzani Mar 1, 2023
72787c5
[`Blip`] Fix blip doctest (#21868)
younesbelkada Mar 1, 2023
9c1d598
Removed BLIP mention from the troubleshooting guide (#21872)
MKhalusova Mar 1, 2023
571dd69
update FSDP and add XLA-FSDP documentation (#21812)
pacman100 Mar 1, 2023
3eba1dd
[doc] deepspeed tests (#21859)
stas00 Mar 1, 2023
53735d7
Add an utility file to get information from test files (#21856)
ydshieh Mar 1, 2023
1d3a1cc
Add check for different embedding types in examples (#21881)
Rocketknight1 Mar 1, 2023
45e1109
Make loading of pretrained gpt2 faster by avoiding initialization of …
twaka Mar 1, 2023
f7c618e
Add TFVisionTextDualEncoder (#21873)
Rocketknight1 Mar 1, 2023
269b054
Add ALIGN to transformers (#21741)
alaradirik Mar 1, 2023
4edfd2d
Fix Gradient checkpointing bug BigBird (#21882)
saswatmeher Mar 1, 2023
36ee128
Fix `WhisperModelTest` (#21883)
ydshieh Mar 1, 2023
89359e4
Fix `test_load_default_pipelines_pt` for `ClapModel` (#21886)
ydshieh Mar 1, 2023
43299c6
fix checkpoint (#21874)
ArthurZucker Mar 2, 2023
633e5e8
[Refactor] Relative imports wherever we can (#21880)
ArthurZucker Mar 2, 2023
c256bc6
[ZAC] fix ci daily (#21893)
ArthurZucker Mar 2, 2023
3412f59
Use PyAV instead of Decord in examples (#21572)
amyeroberts Mar 2, 2023
edbb37f
Add `inputs_embeds` functionality when generating with BioGPT (#21889)
sidkiblawi Mar 2, 2023
b48c7f7
[T5 doc] Fix confusing documentation about `d_kv` (#21896)
ArthurZucker Mar 2, 2023
c87654d
[Whisper] Add rescaling function with `do_normalize` (#21263)
ArthurZucker Mar 2, 2023
648d0de
fix typo in Bart's attention (#21898)
kashif Mar 2, 2023
fb76994
[GPT-J] add deprecation warning (#21869)
ArthurZucker Mar 2, 2023
b6f47b5
fsdp bf16 enable autocast (#21847)
pacman100 Mar 2, 2023
7e6dd66
Fix gradient checkpointing bug LED (#21840)
KMFODA Mar 2, 2023
b405b62
Fix gradient checkpointing bug M2M 100 (#21841)
KMFODA Mar 2, 2023
d9e28d9
Fix gradient checkpointing bug marian (#21842)
KMFODA Mar 2, 2023
50a8ed3
Mark pipeline tests to skip them easily (#21887)
sgugger Mar 2, 2023
99ba36e
Clean up auto mapping names (#21903)
ydshieh Mar 2, 2023
6bf8853
Prophetnet batch dimension inversion fix (#21870)
kiansierra Mar 2, 2023
8e5a1b2
Make schedulers picklable by making lr_lambda fns global (#21768)
Mar 2, 2023
1325459
Refactor whisper asr pipeline to include language too. (#21427)
Narsil Mar 2, 2023
e6de918
Add Blip and Blip2 for pipeline tests (#21904)
ydshieh Mar 2, 2023
88e5c51
Temporarily skip 3 tests in `BridgeTowerModelTest` (#21908)
ydshieh Mar 2, 2023
b2a41d2
Faster zero shot image (#21897)
Narsil Mar 2, 2023
db979f7
[time series] Add Time series inputs tests (#21846)
kashif Mar 2, 2023
9f5bfe1
Avoid modeling tests run in pipeline CI jobs (#21911)
ydshieh Mar 2, 2023
37e0974
Fix doctests for TFVisionTextDualEncoder (#21910)
Rocketknight1 Mar 3, 2023
dcec327
faster forward following what is done for images (#21906)
ArthurZucker Mar 3, 2023
e407b5a
Fix gradient checkpointing bug in MBart (#21918)
KMFODA Mar 3, 2023
99a6234
Fix gradient checkpointing bug in mvp (#21920)
KMFODA Mar 3, 2023
c82bd37
Fix gradient checkpointing megatron bert (#21921)
KMFODA Mar 3, 2023
fa9d2ad
Update `model_split_percents` for `WhisperModelTest` (#21922)
ydshieh Mar 3, 2023
b05e0be
Use large VM for `repo_utils_job` (#21928)
ydshieh Mar 3, 2023
02a77fa
Cleanup more auto mapping names (#21909)
ydshieh Mar 3, 2023
c5a1ff9
feat: filter try/except when looking at custom code (#21914)
zanussbaum Mar 3, 2023
d4306da
Fix `AlignModelTest` tests (#21923)
ydshieh Mar 3, 2023
8c40ba7
Avoid failure in `check_repo.py` due to missing backends (#21930)
ydshieh Mar 3, 2023
956ae62
Fix wrong documentation about DataCollator padding defaults (#21919)
substanc3-dev Mar 3, 2023
82aac00
[Flan-UL2] Add-flan-ul2 (#21929)
ArthurZucker Mar 3, 2023
c5fe06c
Update README logo (#21933)
gary149 Mar 3, 2023
718e9d7
[CLAP] Support batched inputs for CLAP. Fixes pipeline issues (#21931)
ArthurZucker Mar 3, 2023
003a7cc
[Whisper] Fix feature normalization in `WhisperFeatureExtractor` (#21…
bofenghuang Mar 3, 2023
f932ee6
Fix gradient checkpointing bug in OPT (#21943)
KMFODA Mar 4, 2023
f12c74f
Fix gradient checkpointing bug in Pegasus (#21944)
KMFODA Mar 4, 2023
6386eb9
Fix gradient checkpointing bug in Rembert (#21945)
KMFODA Mar 4, 2023
6feb39b
Fix gradient checkpointing bug in Roformer (#21946)
KMFODA Mar 4, 2023
699a229
Fixed gradient_checkpointing/use_cache bug in blenderbot (#21833)
Batese2001 Mar 4, 2023
fcf8134
Update expected values in `XLMProphetNetModelIntegrationTest` (#21957)
ydshieh Mar 6, 2023
bc33fbf
[CI] Fix ci (#21940)
ArthurZucker Mar 6, 2023
0bb1729
Disable DDP for neuron (#21953)
sangeethabal Mar 6, 2023
934d0b8
Fix bert issue (#21963)
saswatmeher Mar 6, 2023
f3c75f8
[Generate] Fix gradient_checkpointing and use_cache bug for BLOOM (#2…
asrimanth Mar 6, 2023
64d95c4
Add missing parameter definition in layoutlm config (#21960)
Atomnp Mar 6, 2023
9474abd
Use larger atol in `torch.allclose` for some tests (#21966)
ydshieh Mar 6, 2023
5d8efc7
Add TF contrastive image text finetuning example (#21939)
Rocketknight1 Mar 6, 2023
f2a2616
Update expected values for `test_xglm_sample` (#21975)
ydshieh Mar 6, 2023
4f84ded
Fix gradient checkpointing bug in BigBird Pegasus (#21976)
KMFODA Mar 6, 2023
451263b
Fix gradient checkpointing bug in Blenderbot Small (#21977)
KMFODA Mar 6, 2023
4a545d1
Fix gradient checkpointing bug in BlipText (#21978)
KMFODA Mar 6, 2023
de496ef
Fix gradient checkpointing bug in Codegen (#21979)
KMFODA Mar 6, 2023
0ce5236
Fix gradient checkpointing bug in ESM (#21980)
KMFODA Mar 6, 2023
31e3c6c
docs: improve clarity for language modeling (#21952)
pdhall99 Mar 6, 2023
5b28b78
Update `Jukebox` tests (#21984)
ydshieh Mar 7, 2023
4063fd9
Add check before int casting for PIL conversion (#21969)
amyeroberts Mar 7, 2023
eec46b4
Fix MinNewTokensLengthLogitsProcessor when used with a list of eos to…
eladsegal Mar 7, 2023
95408e9
[DETR, YOLOS] Fix device bug (#21974)
NielsRogge Mar 7, 2023
10bcbca
Remove unneeded casts to bool (#21983)
regisss Mar 7, 2023
99c5c60
Update `notification_service.py` (#21992)
ydshieh Mar 7, 2023
9402788
Skip `test_multi_gpu_data_parallel_forward` for some model tests (#21…
ydshieh Mar 7, 2023
7c39318
[Whisper] Add model for audio classification (#21754)
sanchit-gandhi Mar 7, 2023
d128f2f
Stop requiring Torch for our TF examples! (#21997)
Rocketknight1 Mar 7, 2023
2156662
[TF] Fix creating a PR while pushing in TF framework (#21968)
ArthurZucker Mar 7, 2023
dde718e
[DETR and friends] Remove is_timm_available (#21814)
NielsRogge Mar 7, 2023
8abe493
[Time-Series] informer model (#21099)
elisim Mar 7, 2023
b338414
Update tiny model creation script and some others files (#22006)
ydshieh Mar 7, 2023
c1f8559
Generate - add 1 to cur_len to make up the new beam length (#21993)
jimmieliu Mar 8, 2023
4130e70
VideoMAE doctest - use valid dummy pixel values (#22022)
amyeroberts Mar 8, 2023
bbd9499
update: bertology paper (#22012)
Mar 8, 2023
dfe9a31
Update `AudioClassificationPipelineTests::test_small_model_pt` for PT…
ydshieh Mar 8, 2023
edea08a
[`bnb`] Fix bnb error message (#22026)
younesbelkada Mar 8, 2023
de81adf
[WIP] Add BridgeTowerForContrastiveLearning (#21964)
abhiwand Mar 8, 2023
a5392ee
Fix test for torchneuroncore in Trainer (#22028)
sgugger Mar 8, 2023
b427b26
Add tokenize_kwargs parameter definition in the FeatureExtractionPipe…
anruijian Mar 8, 2023
6192549
[examples/speech-recognition] Add SpecAugment to run_speech_recogniti…
bofenghuang Mar 8, 2023
9983950
fixes the gradient checkpointing of whisper (#22019)
soma2000-lang Mar 8, 2023
bcc8d30
Avoid `text_config_dict` and `vision_config_dict` being saved for CL…
ydshieh Mar 8, 2023
1cbac68
Mark all `BridgeTower` tests slow for now (#22039)
ydshieh Mar 8, 2023
3ec8171
Bug fix: token classification pipeline while passing offset_mapping (…
cceyda Mar 8, 2023
2055d73
Update ALIGN docs (#22025)
alaradirik Mar 9, 2023
1a77a1a
[21737][T5]: Fix gradient checkpoint bug (#22036)
nipunjindal Mar 9, 2023
81cd655
Docs Improvement - In ZSH, not using ' ' around pip install fails, fi…
shaun-scale Mar 9, 2023
6847743
Can't install tf2 on M1 Chip by default (#22046)
shaun-scale Mar 9, 2023
923110b
Remove set_access_token usage + fail tests if FutureWarning (#22051)
Wauplin Mar 9, 2023
90a7c95
Show the number of `huggingface_hub` warnings in CI report (#22054)
ydshieh Mar 9, 2023
04bfac8
Return analysis for hyperparameter_search with Ray backend (#22040)
anruijian Mar 9, 2023
fdf8409
pt-to-tf model architecture override (#22055)
Rocketknight1 Mar 9, 2023
d0c19b3
rm $ symbol from code block from contributing.md (#22057)
kamalkraj Mar 9, 2023
ec24132
[deepspeed] offload + non-cpuadam optimizer exception (#22043)
stas00 Mar 9, 2023
8434cb8
Edit the docstring of `image_processing_donut` to match code (#22033)
vermouthmjl Mar 9, 2023
ab81d31
Skip 3 tests for `WhisperEncoderModelTest` (#22060)
ydshieh Mar 9, 2023
7a2b915
Add setters by type of args to TrainingArguments (#21570)
sgugger Mar 9, 2023
6d9031f
Update tiny model creation script (#22058)
ydshieh Mar 9, 2023
1a5fc30
Fix case when using --gradient_accumulation_steps with DDP disabled. …
sangeethabal Mar 9, 2023
a9bd5df
Add a progress bar for the total download of shards (#22062)
sgugger Mar 9, 2023
b927335
Fix gradient checkpointing bug in Speech2Text (#22079)
KMFODA Mar 10, 2023
eee195b
Fix gradient checkpointing bug in switch transformer (#22081)
KMFODA Mar 10, 2023
a3fef89
[GPT2] Propose fix for #21080 (#21853)
ArthurZucker Mar 10, 2023
ade26bf
Fix small typo in flan-ul2.mdx (#22068)
kevin51jiang Mar 10, 2023
7014fc3
Generate - Fix broken documentation links (#22078)
gante Mar 10, 2023
419d979
Fix gradient checkpointing bug in Speecht5 (#22080)
KMFODA Mar 10, 2023
a70da86
Fix hint in src/transformers/modeling_utils.py (#22074)
J-shang Mar 10, 2023
2f4cdd9
handle numpy inputs in whole word mask data collator (#22032)
dwyatte Mar 10, 2023
bdec276
GPT-J specific half precision on CPU note (#22086)
MKhalusova Mar 10, 2023
499770c
Fix imports of TF MobileViT (#22065)
sgugger Mar 10, 2023
2f32066
Revert "[GPT2] Propose fix for #21080" (#22093)
ydshieh Mar 10, 2023
b90fbc7
[Whisper] Remove embed_tokens from encoder docstring (#21996)
sanchit-gandhi Mar 11, 2023
32e3466
Add AutoModelForZeroShotImageClassification (#22087)
alaradirik Mar 13, 2023
102b5ff
add new model of MGP-STR (#21418)
wdp-007 Mar 13, 2023
0c88376
Add pr_checks.mdx Italian translation (#17459) (#22116)
alexcalabrese Mar 13, 2023
d0876a0
Fix gradient checkpointing bug in xglm (#22127)
KMFODA Mar 13, 2023
4c14c1f
Fix gradient checkpointing bug in Trajectory Transformer (#22125)
KMFODA Mar 13, 2023
0768c5e
Fix gradient checkpointing bug in xlm_roberta_xl (#22128)
KMFODA Mar 13, 2023
dd3a058
Added big_models.mdx italian translation #17600 (#22115)
nickprock Mar 13, 2023
6652e7d
[`Blip2`] skip accelerate test (#22124)
younesbelkada Mar 13, 2023
c1db6a3
Fix gradient checkpointing bug in xmod (#22129)
KMFODA Mar 13, 2023
ef74e7e
Fix gradient checkpointing bug in LongT5 (#22130)
KMFODA Mar 13, 2023
e61081e
Fix gradient checkpointing bug in trocr (#22126)
KMFODA Mar 13, 2023
8def252
Zero-shot image classification task guide (#22132)
MKhalusova Mar 13, 2023
6cb5132
Fix doc link for MGP-STR (#22138)
sgugger Mar 13, 2023
a096eac
Adding Type Hints to TF_Pegasus model (#21941)
pmollerus23 Mar 13, 2023
54ee56b
Add a new script to check model testers' config (#22063)
ydshieh Mar 13, 2023
9879723
Update configuration_align.py (projected_dim=640) (#22139)
bishmdl76 Mar 13, 2023
d979cf6
[`Whiper`] add `get_input_embeddings` to `WhisperForAudioClassificati…
younesbelkada Mar 13, 2023
e16cbe8
Trainer: let generate pick its inputs (#22108)
gante Mar 13, 2023
1c801d6
Enforce same behavior as PyTorch 2.0 for older versions (#22136)
sgugger Mar 13, 2023
5b85add
[trainer] fix bug in grad accum with multiple epochs (#22098)
stas00 Mar 13, 2023
618697e
[deepspeed docs] Activation Checkpointing (#22099)
stas00 Mar 13, 2023
3a35937
Remove backend check for torch.compile (#22140)
sgugger Mar 13, 2023
f780557
[Safetensors] Add explicit flag to from pretrained (#22083)
patrickvonplaten Mar 13, 2023
ba9e019
Prepare daily CI for torch 2.0.0 (#22135)
ydshieh Mar 13, 2023
101a6cd
docs: New terms and updates to glossary (#21982)
MichaelRipa Mar 13, 2023
2beabd2
[🛠️] Fix-whisper-breaking-changes (#21965)
ArthurZucker Mar 14, 2023
6c2ad00
Move `is_pipeline_test_to_skip` to specific model test classes (#21999)
ydshieh Mar 14, 2023
cdddfbf
Add ConvNeXT V2 (#21679)
alaradirik Mar 14, 2023
ff88703
Update 2 doctest expected values for torch 2.0.0 (#22148)
ydshieh Mar 14, 2023
7f5ad6c
Translation Italian: perf_train_cpu and perf_train_cpu_many (#22151)
nickprock Mar 14, 2023
b45192e
Fix big model inference for T5 models in float16 (#22095)
sgugger Mar 14, 2023
3b22bfb
Create MaskedImageCompletionOutput and fix ViT docs (#22152)
alaradirik Mar 14, 2023
c6318c3
to_pil - don't rescale if int and in range 0-255 (#22158)
amyeroberts Mar 14, 2023
085bf5c
[trainer] add `--optim adamw_torch_fused` for pt-2.0+ (#22144)
stas00 Mar 14, 2023
c52c528
Revert "Enforce same behavior as PyTorch 2.0 for older versions" (#22…
sgugger Mar 14, 2023
ebdb185
v4.28.0.dev0
sgugger Mar 14, 2023
b7036f4
Load optimizer state on CPU to avoid CUDA OOM (#22159)
sgugger Mar 14, 2023
f732975
Run all tests by default (#22162)
sgugger Mar 14, 2023
7b0e2cf
Fix: unfinished_sequences with correct device (#22184)
Stxr Mar 15, 2023
7376814
Revert 22152 MaskedImageCompletionOutput changes (#22187)
amyeroberts Mar 15, 2023
42ad693
Regression pipeline device (#22190)
sgugger Mar 15, 2023
16121ba
Update BridgeTowerForContrastiveLearning (#22145)
abhiwand Mar 15, 2023
7c4999e
t5 remove data dependency (#22097)
prathikr Mar 15, 2023
1c4a9ac
Fix DeepSpeed CI (#22194)
ydshieh Mar 16, 2023
1485bd9
Fix typo in Align docs (#22199)
alaradirik Mar 16, 2023
52a57f7
Update expected values in `MgpstrModelIntegrationTest` (#22195)
ydshieh Mar 16, 2023
09922da
Italian Translation of migration.mdx (#22183)
Baelish03 Mar 16, 2023
0041be5
LLaMA Implementation (#21955)
zphang Mar 16, 2023
464d420
LLaMA Implementation (#21955)
zphang Mar 16, 2023
4c5c0af
Update tiny model creation script (#22202)
ydshieh Mar 16, 2023
a88a4da
Temporarily fix ONNX model exporting error (#21830)
SatyaJandhyalaAtMS Mar 16, 2023
da3ba3a
[`XGLM`] Add `accelerate` support for XGLM (#22207)
younesbelkada Mar 16, 2023
fb366b9
fixes a typo in WhisperFeatureExtractor docs. (#22208)
susnato Mar 16, 2023
5110e57
🔥py38 + torch 2 🔥🔥🔥🚀 (#22204)
ydshieh Mar 16, 2023
97a3d16
Hotfix for natten issue with torch 2.0.0 on CircleCI (#22218)
ydshieh Mar 16, 2023
33d033d
fix typos in llama.mdx (#22223)
keturn Mar 17, 2023
af1c864
fix code example in mgp-str doc (#22219)
wdp-007 Mar 17, 2023
5321867
Use `dash==2.8.1` for now for daily CI (#22227)
ydshieh Mar 17, 2023
42f8f76
Depth estimation task guide (#22205)
MKhalusova Mar 17, 2023
0093402
LLaMA house-keeping (#22216)
sgugger Mar 17, 2023
675d2a5
fix AutoTP in deepspeed could not work for bloom (#22196)
sywangyi Mar 17, 2023
f251441
Add LlamaForSequenceClassification (#22209)
lewtun Mar 17, 2023
314cdf7
Removed .mdx extension in two links (#22230)
MKhalusova Mar 17, 2023
074490b
fix(docs): fix task guide links in model docs (#22226)
Seb0 Mar 17, 2023
3028b20
Fix natten (#22229)
alihassanijr Mar 17, 2023
bec0756
Revert "Use `dash==2.8.1` for now for daily CI" (#22233)
ydshieh Mar 17, 2023
cf601b9
Fix Unnecessary move of tensors from CPU to GPU in LlamaRotaryEmbeddi…
ma787639046 Mar 17, 2023
60d51ef
[trainer] param count for deepspeed zero3 (#22193)
stas00 Mar 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
39 changes: 28 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,24 @@ parameters:
default: false

jobs:
# Ensure running with CircleCI/huggingface
check_circleci_user:
docker:
- image: cimg/python:3.8.12
parallelism: 1
steps:
- run: echo $CIRCLE_PROJECT_USERNAME
- run: |
if [ "$CIRCLE_PROJECT_USERNAME" = "huggingface" ]; then
exit 0
else
echo "The CI is running under $CIRCLE_PROJECT_USERNAME personal account. Please follow https://support.circleci.com/hc/en-us/articles/360008097173-Troubleshooting-why-pull-requests-are-not-triggering-jobs-on-my-organization- to fix it."; exit -1
fi
# Fetch the tests to run
fetch_tests:
working_directory: ~/transformers
docker:
- image: cimg/python:3.7.12
- image: cimg/python:3.8.12
parallelism: 1
steps:
- checkout
Expand Down Expand Up @@ -72,7 +85,7 @@ jobs:
fetch_all_tests:
working_directory: ~/transformers
docker:
- image: cimg/python:3.7.12
- image: cimg/python:3.8.12
parallelism: 1
steps:
- checkout
Expand All @@ -98,7 +111,7 @@ jobs:
check_code_quality:
working_directory: ~/transformers
docker:
- image: cimg/python:3.7.12
- image: cimg/python:3.8.12
resource_class: large
environment:
TRANSFORMERS_IS_CI: yes
Expand All @@ -108,8 +121,8 @@ jobs:
- checkout
- restore_cache:
keys:
- v0.5-code_quality-{{ checksum "setup.py" }}
- v0.5-code-quality
- v0.6-code_quality-{{ checksum "setup.py" }}
- v0.6-code-quality
- run: pip install --upgrade pip
- run: pip install .[all,quality]
- save_cache:
Expand All @@ -121,18 +134,17 @@ jobs:
command: pip freeze | tee installed.txt
- store_artifacts:
path: ~/transformers/installed.txt
- run: black --check --preview examples tests src utils
- run: isort --check-only examples tests src utils
- run: black --check examples tests src utils
- run: ruff examples tests src utils
- run: python utils/custom_init_isort.py --check_only
- run: python utils/sort_auto_mappings.py --check_only
- run: flake8 examples tests src utils
- run: doc-builder style src/transformers docs/source --max_len 119 --check_only --path_to_docs docs/source
- run: python utils/check_doc_toc.py

check_repository_consistency:
working_directory: ~/transformers
docker:
- image: cimg/python:3.7.12
- image: cimg/python:3.8.12
resource_class: large
environment:
TRANSFORMERS_IS_CI: yes
Expand All @@ -142,8 +154,8 @@ jobs:
- checkout
- restore_cache:
keys:
- v0.5-repository_consistency-{{ checksum "setup.py" }}
- v0.5-repository_consistency
- v0.6-repository_consistency-{{ checksum "setup.py" }}
- v0.6-repository_consistency
- run: pip install --upgrade pip
- run: pip install .[all,quality]
- save_cache:
Expand All @@ -161,23 +173,28 @@ jobs:
- run: python utils/check_repo.py
- run: python utils/check_inits.py
- run: python utils/check_config_docstrings.py
- run: python utils/check_config_attributes.py
- run: python utils/check_doctest_list.py
- run: make deps_table_check_updated
- run: python utils/tests_fetcher.py --sanity_check
- run: python utils/update_metadata.py --check-only
- run: python utils/check_task_guides.py

workflows:
version: 2
setup_and_quality:
when:
not: <<pipeline.parameters.nightly>>
jobs:
- check_circleci_user
- check_code_quality
- check_repository_consistency
- fetch_tests

nightly:
when: <<pipeline.parameters.nightly>>
jobs:
- check_circleci_user
- check_code_quality
- check_repository_consistency
- fetch_all_tests
103 changes: 86 additions & 17 deletions .circleci/create_circleci_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,33 @@

import argparse
import copy
import glob
import os
import random
from dataclasses import dataclass
from typing import Any, Dict, List, Optional

import yaml


COMMON_ENV_VARIABLES = {"OMP_NUM_THREADS": 1, "TRANSFORMERS_IS_CI": True, "PYTEST_TIMEOUT": 120}
COMMON_ENV_VARIABLES = {
"OMP_NUM_THREADS": 1,
"TRANSFORMERS_IS_CI": True,
"PYTEST_TIMEOUT": 120,
"RUN_PIPELINE_TESTS": False,
"RUN_PT_TF_CROSS_TESTS": False,
"RUN_PT_FLAX_CROSS_TESTS": False,
}
COMMON_PYTEST_OPTIONS = {"max-worker-restart": 0, "dist": "loadfile", "s": None}
DEFAULT_DOCKER_IMAGE = [{"image": "cimg/python:3.7.12"}]
DEFAULT_DOCKER_IMAGE = [{"image": "cimg/python:3.8.12"}]


@dataclass
class CircleCIJob:
name: str
additional_env: Dict[str, Any] = None
cache_name: str = None
cache_version: str = "0.5"
cache_version: str = "0.6"
docker_image: List[Dict[str, str]] = None
install_steps: List[str] = None
marker: Optional[str] = None
Expand All @@ -58,12 +67,16 @@ def __post_init__(self):
self.pytest_options = {}
if isinstance(self.tests_to_run, str):
self.tests_to_run = [self.tests_to_run]
if self.parallelism is None:
self.parallelism = 1

def to_dict(self):
env = COMMON_ENV_VARIABLES.copy()
env.update(self.additional_env)
job = {
"working_directory": self.working_directory,
"docker": self.docker_image,
"environment": {**COMMON_ENV_VARIABLES, **self.additional_env},
"environment": env,
}
if self.resource_class is not None:
job["resource_class"] = self.resource_class
Expand Down Expand Up @@ -99,10 +112,57 @@ def to_dict(self):
f"--make-reports={self.name}" if "examples" in self.name else f"--make-reports=tests_{self.name}"
)
test_command = f"python -m pytest -n {self.pytest_num_workers} " + " ".join(pytest_flags)
if self.tests_to_run is None:
test_command += " << pipeline.parameters.tests_to_run >>"
if self.parallelism == 1:
if self.tests_to_run is None:
test_command += " << pipeline.parameters.tests_to_run >>"
else:
test_command += " " + " ".join(self.tests_to_run)
else:
test_command += " " + " ".join(self.tests_to_run)
# We need explicit list instead of `pipeline.parameters.tests_to_run` (only available at job runtime)
tests = self.tests_to_run
if tests is None:
folder = os.environ["test_preparation_dir"]
test_file = os.path.join(folder, "filtered_test_list.txt")
if os.path.exists(test_file):
with open(test_file) as f:
tests = f.read().split(" ")

# expand the test list
if tests == ["tests"]:
tests = [os.path.join("tests", x) for x in os.listdir("tests")]
expanded_tests = []
for test in tests:
if test.endswith(".py"):
expanded_tests.append(test)
elif test == "tests/models":
expanded_tests.extend([os.path.join(test, x) for x in os.listdir(test)])
elif test == "tests/pipelines":
expanded_tests.extend([os.path.join(test, x) for x in os.listdir(test)])
else:
expanded_tests.append(test)
# Avoid long tests always being collected together
random.shuffle(expanded_tests)
tests = " ".join(expanded_tests)

# Each executor to run ~10 tests
n_executors = max(len(tests) // 10, 1)
# Avoid empty test list on some executor(s) or launching too many executors
if n_executors > self.parallelism:
n_executors = self.parallelism
job["parallelism"] = n_executors

# Need to be newline separated for the command `circleci tests split` below
command = f'echo {tests} | tr " " "\\n" >> tests.txt'
steps.append({"run": {"name": "Get tests", "command": command}})

command = 'TESTS=$(circleci tests split tests.txt) && echo $TESTS > splitted_tests.txt'
steps.append({"run": {"name": "Split tests", "command": command}})

steps.append({"store_artifacts": {"path": "~/transformers/tests.txt"}})
steps.append({"store_artifacts": {"path": "~/transformers/splitted_tests.txt"}})

test_command = f"python -m pytest -n {self.pytest_num_workers} " + " ".join(pytest_flags)
test_command += " $(cat splitted_tests.txt)"
if self.marker is not None:
test_command += f" -m {self.marker}"
test_command += " | tee tests_output.txt"
Expand Down Expand Up @@ -156,6 +216,7 @@ def job_name(self):
"pip install .[sklearn,torch,testing,sentencepiece,torch-speech,vision,timm]",
"pip install git+https://github.com/huggingface/accelerate",
],
parallelism=1,
pytest_num_workers=3,
)

Expand All @@ -168,6 +229,7 @@ def job_name(self):
"pip install .[sklearn,tf-cpu,testing,sentencepiece,tf-speech,vision]",
"pip install tensorflow_probability",
],
parallelism=1,
pytest_options={"rA": None},
)

Expand All @@ -179,31 +241,34 @@ def job_name(self):
"pip install --upgrade pip",
"pip install .[flax,testing,sentencepiece,flax-speech,vision]",
],
parallelism=1,
pytest_options={"rA": None},
)


pipelines_torch_job = CircleCIJob(
"pipelines_torch",
additional_env={"RUN_PIPELINE_TESTS": True},
install_steps=[
"sudo apt-get -y update && sudo apt-get install -y libsndfile1-dev espeak-ng",
"pip install --upgrade pip",
"pip install .[sklearn,torch,testing,sentencepiece,torch-speech,vision,timm]",
"pip install .[sklearn,torch,testing,sentencepiece,torch-speech,vision,timm,video]",
],
pytest_options={"rA": None},
tests_to_run="tests/pipelines/"
marker="is_pipeline_test",
)


pipelines_tf_job = CircleCIJob(
"pipelines_tf",
additional_env={"RUN_PIPELINE_TESTS": True},
install_steps=[
"pip install --upgrade pip",
"pip install .[sklearn,tf-cpu,testing,sentencepiece]",
"pip install .[sklearn,tf-cpu,testing,sentencepiece,vision]",
"pip install tensorflow_probability",
],
pytest_options={"rA": None},
tests_to_run="tests/pipelines/"
marker="is_pipeline_test",
)


Expand Down Expand Up @@ -298,13 +363,14 @@ def job_name(self):
)


layoutlm_job = CircleCIJob(
"layoutlmv2_and_v3",
exotic_models_job = CircleCIJob(
"exotic_models",
install_steps=[
"sudo apt-get -y update && sudo apt-get install -y libsndfile1-dev",
"pip install --upgrade pip",
"pip install .[torch,testing,vision]",
"pip install torchvision",
"pip install scipy",
"pip install 'git+https://github.com/facebookresearch/detectron2.git'",
"sudo apt install tesseract-ocr",
"pip install pytesseract",
Expand All @@ -313,6 +379,7 @@ def job_name(self):
tests_to_run=[
"tests/models/*layoutlmv*",
"tests/models/*nat",
"tests/models/deta",
],
pytest_num_workers=1,
pytest_options={"durations": 100},
Expand All @@ -323,11 +390,11 @@ def job_name(self):
"repo_utils",
install_steps=[
"pip install --upgrade pip",
"pip install .[quality,testing]",
"pip install .[quality,testing,torch]",
],
parallelism=None,
pytest_num_workers=1,
resource_class=None,
resource_class="large",
tests_to_run="tests/repo_utils",
)

Expand All @@ -340,7 +407,7 @@ def job_name(self):
custom_tokenizers_job,
hub_job,
onnx_job,
layoutlm_job,
exotic_models_job,
]
EXAMPLES_TESTS = [
examples_torch_job,
Expand All @@ -356,6 +423,8 @@ def job_name(self):
def create_circleci_config(folder=None):
if folder is None:
folder = os.getcwd()
# Used in CircleCIJob.to_dict() to expand the test list (for using parallelism)
os.environ["test_preparation_dir"] = folder
jobs = []
all_test_file = os.path.join(folder, "test_list.txt")
if os.path.exists(all_test_file):
Expand All @@ -378,7 +447,7 @@ def create_circleci_config(folder=None):
example_file = os.path.join(folder, "examples_test_list.txt")
if os.path.exists(example_file) and os.path.getsize(example_file) > 0:
jobs.extend(EXAMPLES_TESTS)

repo_util_file = os.path.join(folder, "test_repo_utils.txt")
if os.path.exists(repo_util_file) and os.path.getsize(repo_util_file) > 0:
jobs.extend(REPO_UTIL_TESTS)
Expand Down
Loading