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

[WIP] Add Jukebox model #16875

Closed
wants to merge 399 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
399 commits
Select commit Hold shift + click to select a range
351cdbd
Fix self-push CI report path in cat (#17111)
ydshieh May 6, 2022
215e068
Added BigBirdPegasus onnx config (#17104)
nandwalritik May 6, 2022
3ff2ed2
fix hp bug
ArthurZucker May 8, 2022
5f84cf1
update test file to loead dummy weights for testing
ArthurZucker May 8, 2022
7335fbf
templat convert file
ArthurZucker May 8, 2022
f7c375e
make style
ArthurZucker May 8, 2022
199e032
update tokenizer and paths + quality
ArthurZucker May 8, 2022
045ee7b
update tokenizer to correct config
ArthurZucker May 8, 2022
9faad5f
cleqn init
ArthurZucker May 8, 2022
3212afa
split single_gpu and multi_gpu (#17083)
ydshieh May 9, 2022
e9fd583
LayoutLMv2Processor: ensure 1-to-1 mapping between images and samples…
garyhlai May 9, 2022
a021f2b
Add type hints for BigBirdPegasus and Data2VecText PyTorch models (#1…
robsmith155 May 9, 2022
dc3645d
add `mobilebert` onnx configs (#17029)
manandey May 9, 2022
05fc176
PyTorch FSDP integration in Trainer (#17136)
pacman100 May 9, 2022
7783fa6
Fix quality and repo consistency
sgugger May 9, 2022
df735d1
[WIP] Fix Pyright static type checking by replacing if-else imports w…
d-miketa May 9, 2022
2fbb237
Add the auto_find_batch_size capability from Accelerate into Trainer …
muellerzr May 9, 2022
766d4bf
Fix MLflowCallback end_run() and add support for tags and nested runs…
orieg May 9, 2022
d719bcd
Fix all docs for accelerate install directions (#17145)
muellerzr May 9, 2022
6d80c92
LogSumExp trick `question_answering` pipeline. (#17143)
Narsil May 10, 2022
a9e8517
Debugged different outputa
ArthurZucker May 10, 2022
7078608
working test
ArthurZucker May 10, 2022
4c4c49d
make style
ArthurZucker May 10, 2022
1fc0a84
clean up
ArthurZucker May 10, 2022
52caa64
correct tests with dummy weights
ArthurZucker May 10, 2022
b049e21
make style
ArthurZucker May 10, 2022
b9cd1fd
make quality
ArthurZucker May 10, 2022
a478f0a
removed duplicate
ArthurZucker May 10, 2022
e902d2f
fix duplicate
ArthurZucker May 10, 2022
1766fa2
train args defaulting None marked as Optional (#17156)
d-miketa May 10, 2022
9aeacfe
[trainer] sharded _load_best_model (#17150)
stas00 May 10, 2022
f861504
[Deepspeed] add many more models to the model zoo test (#12695)
stas00 May 10, 2022
259eeb6
Fixing the output of code examples in the preprocessing chapter (#17162)
HallerPatrick May 10, 2022
976835d
missing file (#17164)
stas00 May 10, 2022
e99f0ef
Add MLFLOW_FLATTEN_PARAMS support in MLflowCallback (#17148)
orieg May 10, 2022
4ad2f68
Fix template init (#17163)
sgugger May 10, 2022
48a8f3d
Add DebertaV2ForMultipleChoice (#17135)
zphang May 10, 2022
4a419d4
MobileBERT tokenizer tests (#16896)
leondz May 10, 2022
63517fd
[M2M100 doc] remove duplicate example (#17175)
patil-suraj May 11, 2022
0e6ec2a
Extend Transformers Trainer Class to Enable PyTorch SGD/Adagrad Optim…
jianan-gu May 11, 2022
0645b07
propagate "attention_mask" dtype for "use_past" in OnnxConfig.generat…
arampacha May 11, 2022
0a2bea4
Fix repo consistency
sgugger May 11, 2022
6bc6797
Convert image to rgb for clip model (#17101)
hengkuanwee May 11, 2022
5229744
Add missing RetriBERT tokenizer tests (#17017)
mpoemsl May 11, 2022
c33f604
[WIP] Enable reproducibility for distributed trainings (#16907)
hasansalimkanmaz May 11, 2022
edcc66d
Remove unnecessary columns for all dataset types in `Trainer` (#17166)
Yard1 May 11, 2022
c76afa5
Fix LED documentation (#17181)
manuelciosici May 11, 2022
47412c7
Ensure tensors are at least 1d for pad and concat (#17179)
Yard1 May 11, 2022
934e21c
add shift_tokens_right in FlaxMT5 (#17188)
patil-suraj May 11, 2022
7b95825
Remove columns before passing to data collator (#17187)
Yard1 May 11, 2022
a10f618
[feat] Add FLAVA model (#16654)
apsdehal May 11, 2022
d1d5ebb
Remove duplicated os.path.join (#17192)
shijie-wu May 12, 2022
36ddcc0
Spanish translation of philosophy.mdx #15947 (#16922)
jkmg May 12, 2022
ae82da2
Added es version of language_modeling.mdx doc (#17021)
jQuinRivero May 12, 2022
e2d678b
Documentation: Spanish translation of fast_tokenizers.mdx (#16882)
jloayza10 May 12, 2022
1a66a6c
Translate index.mdx (to ES) and add Spanish models to quicktour.mdx e…
omarespejel May 12, 2022
b17b788
Fix style error in Spanish docs (#17197)
osanseviero May 12, 2022
1a68870
Fix contents in index.mdx to match docs' sidebar (#17198)
omarespejel May 12, 2022
8c7481f
ViT and Swin symbolic tracing with torch.fx (#17182)
michaelbenayoun May 12, 2022
b971c76
Add OPT (#17088)
younesbelkada May 12, 2022
a42242d
migrate azure blob for beit checkpoints (#16902)
donglixp May 12, 2022
9f16a1c
Update data2vec.mdx to include a Colab Notebook link (that shows fine…
sayakpaul May 12, 2022
5294fa1
Dev version
LysandreJik May 12, 2022
f04257f
Add test to ensure models can take int64 inputs (#17210)
Rocketknight1 May 12, 2022
30be0da
Fix dependency table
LysandreJik May 12, 2022
9bd67ac
update BART docs (#17212)
patil-suraj May 12, 2022
afe5d42
Black preview (#17217)
sgugger May 12, 2022
3f936df
Fix typo in bug report template (#17178)
fxmarty May 12, 2022
85fc455
Added translation of installation.mdx to Portuguese Issue #16824 (#16…
rzimmerdev May 13, 2022
dfc7601
OPT-fix (#17229)
younesbelkada May 13, 2022
18d6b35
OPT - fix docstring and improve tests slighly (#17228)
patrickvonplaten May 13, 2022
38043d8
Update self-push workflow (#17177)
ydshieh May 13, 2022
993553b
fix --gpus option for docker (#17235)
ydshieh May 13, 2022
9c8fde8
Handle copyright in add-new-model-like (#17218)
sgugger May 13, 2022
b96cb16
Fix Trainer for Datasets that don't have dict items (#17239)
sgugger May 13, 2022
7198b63
install dev. version of accelerate (#17243)
ydshieh May 13, 2022
506899d
Fix push CI channel (#17242)
ydshieh May 13, 2022
50d1867
Add PR title to push CI report (#17246)
ydshieh May 13, 2022
f902481
[ fast_tokenizers.mdx ] - Added translation to portuguese to tutorial…
Fellip15 May 13, 2022
16be422
Translated version of model_sharing.mdx doc to spanish (#16184)
Gerard-170 May 13, 2022
ee393c0
Guide to create custom models in Spanish (#17158)
ignacioct May 13, 2022
e86faec
Fix obvious typos in flax decoder impl (#17279)
cloudhan May 16, 2022
d3d87b4
TF - Fix convnext classification example (#17261)
gante May 16, 2022
71abd3a
[WIP] [doc] performance/scalability revamp (#15723)
stas00 May 16, 2022
71d18d0
fixed bug in run_mlm_flax_stream.py (#17203)
KennethEnevoldsen May 16, 2022
518dd12
Updated checkpoint support for Sagemaker Model Parallel (#17219)
cavdard May 16, 2022
e730e12
Update codeparrot data preprocessing (#16944)
loubnabnl May 16, 2022
05a9057
CodeParrot data pretokenization (#16932)
loubnabnl May 16, 2022
a5d1839
Remove next sentence prediction from supported ONNX tasks (#17276)
lewtun May 16, 2022
95b6bef
Align logits and labels in OPT (#17237)
MichelBartels May 16, 2022
2f611f8
Mlflowcallback fix nonetype error (#17171)
orieg May 16, 2022
ddb1a47
Automatically sort auto mappings (#17250)
sgugger May 16, 2022
66b3e10
Make TrainerHyperParameterSigOptIntegrationTest slow test (#17288)
ydshieh May 16, 2022
9b0d286
Better error in the Auto API when a dep is missing (#17289)
sgugger May 16, 2022
3fb82f7
Fix FlavaForPreTrainingIntegrationTest CI test (#17232)
ydshieh May 16, 2022
8600d77
Use the PR URL in CI report (#17269)
ydshieh May 16, 2022
053a80c
logging documentation update (#17174)
sanderland May 16, 2022
6cb7187
docs(transformers): fix typo (#17263)
k-zehnder May 16, 2022
f6a6388
Add Tensorflow Swin model (#16988)
amyeroberts May 16, 2022
e705e12
[Tests] Fix slow opt tests (#17282)
patrickvonplaten May 16, 2022
f0395cf
Fix test_model_parallelization (#17249)
lkm2835 May 16, 2022
5a99573
Add Wav2Vec2Conformer (#16812)
patrickvonplaten May 16, 2022
1ac2b8f
Fix missing job action button in CI report (#17270)
ydshieh May 17, 2022
a26ab95
Fix wrong PT/TF categories in CI report (#17272)
ydshieh May 17, 2022
ec7f8af
[ConvNeXT] Fix drop_path_rate (#17280)
NielsRogge May 17, 2022
6d21142
fix retribert's `test_torch_encode_plus_sent_to_model` (#17231)
SaulLu May 17, 2022
651e48e
Fix tests of mixed precision now that experimental is deprecated (#17…
Rocketknight1 May 17, 2022
349f1c8
Rewrite TensorFlow train_step and test_step (#17057)
Rocketknight1 May 17, 2022
1f13ba8
correct opt (#17301)
patrickvonplaten May 17, 2022
28a0811
Improve mismatched sizes management when loading a pretrained model (…
regisss May 17, 2022
10704e1
[Test] Fix W2V-Conformer integration test (#17303)
patrickvonplaten May 17, 2022
38ddab1
Doctest longformer (#16441)
KMFODA May 17, 2022
986dd5c
Fix style
sgugger May 17, 2022
032d63b
Fix dummy creation script (#17304)
sgugger May 17, 2022
0511305
Add PR author in CI report + merged by info (#17298)
ydshieh May 17, 2022
bad3583
Add support for pretraining recurring span selection to Splinter (#17…
jvcop May 17, 2022
d9050dc
[LED] fix global_attention_mask not being passed for generation and d…
caesar-one May 17, 2022
c352640
fix (#17310)
patrickvonplaten May 17, 2022
d6b8e9c
Add trajectory transformer (#17141)
CarlCochet May 17, 2022
7ba1d4e
Add type hints for ProphetNet (Pytorch) (#17223)
jQuinRivero May 18, 2022
60ad734
[T5] Fix init in TF and Flax for pretraining (#17294)
patrickvonplaten May 18, 2022
1c9d1f4
Updating the docs for `max_seq_len` in QA pipeline (#17316)
Narsil May 18, 2022
2cb2ea3
Accepting real pytorch device as arguments. (#17318)
Narsil May 18, 2022
fe28eb9
remove (#17325)
ydshieh May 18, 2022
91ede48
Fix typo (#17328)
kamalkraj May 18, 2022
5fdb54e
Add Information Gain Filtration algorithm (#16953)
mraunak May 18, 2022
4710702
Fix style
sgugger May 18, 2022
adc0ff2
Add CvT (#17299)
NielsRogge May 18, 2022
6da76b9
Add onnx export cuda support (#17183)
JingyaHuang May 18, 2022
b3b9f99
Fix test_t5_decoder_model_past_large_inputs (#17320)
ydshieh May 18, 2022
060fe61
Not send successful report (#17329)
ydshieh May 18, 2022
6e195eb
docs for typical decoding (#17186)
jadermcs May 18, 2022
1762ded
Fix metric calculation in examples and setup tests to run on multi-gp…
muellerzr May 18, 2022
6aad387
fix (#17337)
ydshieh May 18, 2022
1b20c97
Fix ci_url might be None (#17332)
ydshieh May 18, 2022
3601aa8
[tests] fix copy-n-paste error (#17312)
stas00 May 18, 2022
a4386d7
[BC] Fixing usage of text pairs (#17324)
Narsil May 19, 2022
2b28229
Adding `batch_size` test to QA pipeline. (#17330)
Narsil May 19, 2022
e8714c0
[OPT] Run test in lower precision on GPU (#17353)
patrickvonplaten May 19, 2022
518bd02
[Generation] Fix Transition probs (#17311)
patrickvonplaten May 19, 2022
5d6feec
fix for 17292 (#17293)
nadahlberg May 19, 2022
48c2269
Fix bug in Wav2Vec2 pretrain example (#17326)
ddobokki May 19, 2022
5419205
[Test OPT] Add batch generation test opt (#17359)
patrickvonplaten May 19, 2022
3fd7de4
Pin dill to fix examples (#17368)
sgugger May 20, 2022
b9bb417
Fix a typo relative_postion_if_large -> relative_position_if_large (#…
stancld May 20, 2022
b48ac1a
Fix CodeParrot training script (#17291)
loubnabnl May 23, 2022
7b8cb26
Correct & Improve Doctests for LayoutLMv2 (#17168)
garyhlai May 23, 2022
c86aad6
Fix cvt docstrings (#17367)
AnugunjNaman May 23, 2022
1cd01b0
Fix Comet ML integration (#17381)
mxschmdt May 23, 2022
2e7e428
Traced models serialization and torchscripting fix (#17206)
michaelbenayoun May 23, 2022
56f5059
Use Accelerate in `from_pretrained` for big model inference (#17341)
sgugger May 23, 2022
71cced8
OPTForCausalLM lm_head input size should be config.word_embed_proj_di…
vfbd May 23, 2022
13541b4
Add support for `device_map="auto"` to OPT (#17382)
sgugger May 23, 2022
31ee80d
Add LayoutLMv3 (#17060)
NielsRogge May 24, 2022
d980929
Enabling `imageGPT` auto feature extractor. (#16871)
Narsil May 24, 2022
374a2f6
Clean up CLIP tests (#17380)
NielsRogge May 24, 2022
71e6027
[WIP] Adding GPT-NeoX-20B (#16659)
zphang May 24, 2022
1ef9a1e
Bump tensorflow in /examples/research_projects/decision_transformer (…
dependabot[bot] May 24, 2022
4d727bd
Fix expected value for OPT test `test_inference_no_head` (#17395)
ydshieh May 25, 2022
bd908e9
Fix README localizer script (#17407)
sgugger May 25, 2022
56b35ce
Make check_init script more robust and clean inits (#17408)
sgugger May 25, 2022
31484af
Add test for new model parallelism features (#17401)
sgugger May 25, 2022
897a8dd
Support compilation via Torchdynamo, AOT Autograd, NVFuser (#17308)
anijain2305 May 25, 2022
35e2d13
Upd AutoTokenizer.from_pretrained doc examples (#17416)
c00k1ez May 25, 2022
284fc6c
Add link to Hub PR docs in model cards (#17421)
lewtun May 25, 2022
740a157
fix link in performance docs (#17419)
lvwerra May 25, 2022
a9eca74
Wav2vec2 finetuning shared file system (#17423)
patrickvonplaten May 25, 2022
70484a8
Adding the Portuguese version of the tasks/sequence_classification.md…
jonatasgrosman May 25, 2022
5e7f085
Added es version of bertology.mdx doc (#17255)
jQuinRivero May 25, 2022
8f46ac9
Spanish translation of the files sagemaker.mdx and image_classificati…
SimplyJuanjo May 25, 2022
2295bca
Spanish translation of the file preprocessing.mdx (#16299)
yharyarias May 26, 2022
7535d92
Pin protobouf that breaks TensorBoard in PyTorch (#17440)
sgugger May 26, 2022
98f6e1e
Fix model parallelism test (#17439)
sgugger May 26, 2022
7999ec1
[OPT] Fix bos token id default (#17441)
patrickvonplaten May 26, 2022
d156898
Improve notrainer examples (#17449)
pacman100 May 27, 2022
8279f37
Initial commit, created template with transformers-cli
ArthurZucker Apr 21, 2022
23d9865
add jukebox to modelling auto
ArthurZucker Apr 26, 2022
41ea04c
add jukebox to tokenization auto
ArthurZucker Apr 26, 2022
1dacf67
update init files
ArthurZucker Apr 26, 2022
217563b
add jukebox.mdx model card
ArthurZucker Apr 26, 2022
e8be780
Add template files
ArthurZucker Apr 26, 2022
f296b11
add unchanged template jukebox_fast tokenizer
ArthurZucker Apr 26, 2022
11a6597
Implemented tokenizer
ArthurZucker Apr 26, 2022
c8937b9
fix style
ArthurZucker Apr 26, 2022
add7f98
Update tokenization
ArthurZucker Apr 26, 2022
08dc659
Small changes to put jukebox name in template file
ArthurZucker Apr 26, 2022
ce73348
make style
ArthurZucker Apr 26, 2022
d2d6243
make quality
ArthurZucker Apr 26, 2022
2504074
redefined call function
ArthurZucker Apr 27, 2022
6a77b9e
update call function
ArthurZucker Apr 27, 2022
7bc511c
make style
ArthurZucker Apr 27, 2022
8bf30b1
deleted useless vocab files for now
ArthurZucker Apr 27, 2022
c574491
make style
ArthurZucker Apr 27, 2022
cf50817
Removed unicode and make fix copy
ArthurZucker Apr 27, 2022
282f16a
remove useless INFINITY defintion in test tokeniz
ArthurZucker Apr 27, 2022
44a1b78
copy/pasted and simplified VQ-VAE
ArthurZucker Apr 29, 2022
a692d50
replaced arguments with config
ArthurZucker Apr 29, 2022
66b93d8
remove last argument
ArthurZucker Apr 29, 2022
d80a315
added VQ-VAE parameters to the configuration file
ArthurZucker May 2, 2022
2d1b8a2
added requires classes to have all the Jukebox coponents
ArthurZucker May 2, 2022
e99997f
started adding prior parameters
ArthurZucker May 3, 2022
ac16ef8
make style and update
ArthurZucker May 3, 2022
9496f00
added most of the hyperparameters
ArthurZucker May 4, 2022
79f428a
model can be initialized
ArthurZucker May 4, 2022
a5f4214
prepared test_modelling
ArthurZucker May 5, 2022
e10eed7
make style and corrected small bugs
ArthurZucker May 5, 2022
77e6598
update default lyric tokens
ArthurZucker May 5, 2022
02efa73
updated tokenizer call
ArthurZucker May 5, 2022
27afa6a
smaller sample in JConfig
ArthurZucker May 5, 2022
a373d95
fixed init for repo-consistency
ArthurZucker May 5, 2022
78fa3ee
make fix-copies
ArthurZucker May 5, 2022
65b5d5a
make style
ArthurZucker May 5, 2022
be8d105
removed unused imports
ArthurZucker May 5, 2022
0aef47c
New set of hyperparameters debugges
ArthurZucker May 5, 2022
90902a7
Make style
ArthurZucker May 5, 2022
5218515
Updated tst modelling
ArthurZucker May 6, 2022
6af4747
index MD fixed
ArthurZucker May 6, 2022
b0bb9f7
fix hp bug
ArthurZucker May 8, 2022
0054260
update test file to loead dummy weights for testing
ArthurZucker May 8, 2022
629c051
templat convert file
ArthurZucker May 8, 2022
b7bb4a0
make style
ArthurZucker May 8, 2022
07fc854
update tokenizer and paths + quality
ArthurZucker May 8, 2022
113c105
update tokenizer to correct config
ArthurZucker May 8, 2022
fd74c8b
cleqn init
ArthurZucker May 8, 2022
9c574c4
Debugged different outputa
ArthurZucker May 10, 2022
6e2020f
working test
ArthurZucker May 10, 2022
df7cfbd
make style
ArthurZucker May 10, 2022
8d01d95
clean up
ArthurZucker May 10, 2022
5b76aa6
correct tests with dummy weights
ArthurZucker May 10, 2022
7b8da50
make style
ArthurZucker May 10, 2022
a8b124f
make quality
ArthurZucker May 10, 2022
61d78b6
fix duplicate
ArthurZucker May 10, 2022
37c3f9a
Merge branch 'add_jukebox' of https://github.com/ArthurZucker/transfo…
ArthurZucker May 30, 2022
02f2eda
style and re-ordering
ArthurZucker May 30, 2022
d767f79
moved jukebox test
ArthurZucker May 30, 2022
a15b851
fixup and copies
ArthurZucker May 30, 2022
1c9d346
udpate
ArthurZucker May 30, 2022
573f0af
update scripts
ArthurZucker May 30, 2022
e185653
remove unused and wrong import
ArthurZucker May 30, 2022
b5ac1da
update
ArthurZucker May 31, 2022
910cf3f
update test
ArthurZucker May 31, 2022
97e8162
begin gpu support
ArthurZucker May 31, 2022
8fd494e
update device
ArthurZucker May 31, 2022
e836d18
update
ArthurZucker May 31, 2022
23a64d4
style
ArthurZucker May 31, 2022
68eef31
update test
ArthurZucker May 31, 2022
72f4210
updatex
ArthurZucker Jun 1, 2022
106d179
update tests parameters
ArthurZucker Jun 1, 2022
a8f87b7
test from the notebook
ArthurZucker Jun 1, 2022
be6a271
Merge Main
ArthurZucker Jun 22, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
92 changes: 50 additions & 42 deletions .circleci/config.yml

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion .gitattributes
@@ -1,3 +1,4 @@
*.py eol=lf
*.rst eol=lf
*.md eol=lf
*.md eol=lf
*.mdx eol=lf
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug-report.yml
@@ -1,5 +1,5 @@
name: "\U0001F41B Bug Report"
description: Submit a bug report to help us import transformers
description: Submit a bug report to help us improve transformers
labels: [ "bug" ]
body:
- type: textarea
Expand Down Expand Up @@ -118,4 +118,4 @@ body:
attributes:
label: Expected behavior
description: "A clear and concise description of what you would expect to happen."
render: shell
render: shell
5 changes: 4 additions & 1 deletion .github/ISSUE_TEMPLATE/config.yml
@@ -1,9 +1,12 @@
blank_issues_enabled: true
version: 2.1
contact_links:
- name: Model checkpoints on the Hugging Face Hub
url: https://huggingface.co/models
about: Open a Pull request / Discussion related to a specific model checkpoint directly on the Hugging Face Hub
- name: Website Related
url: https://github.com/huggingface/hub-docs/issues
about: Feature requests and bug reports related to the website
- name: Forum
url: https://discuss.huggingface.co/
about: General usage questions and community discussions
about: General usage questions and community discussions
17 changes: 15 additions & 2 deletions .github/workflows/add-model-like.yml
Expand Up @@ -27,14 +27,27 @@ jobs:
id: cache
with:
path: ~/venv/
key: v2-tests_model_like-${{ hashFiles('setup.py') }}
key: v4-tests_model_like-${{ hashFiles('setup.py') }}

- name: Create virtual environment on cache miss
if: steps.cache.outputs.cache-hit != 'true'
run: |
python -m venv ~/venv && . ~/venv/bin/activate
pip install --upgrade pip!=21.3
pip install .[dev]
pip install -e .[dev]

- name: Check transformers location
# make `transformers` available as package (required since we use `-e` flag) and check it's indeed from the repo.
run: |
. ~/venv/bin/activate
python setup.py develop
transformer_loc=$(pip show transformers | grep "Location: " | cut -c11-)
transformer_repo_loc=$(pwd .)
if [ "$transformer_loc" != "$transformer_repo_loc/src" ]; then
echo "transformers is from $transformer_loc but it shoud be from $transformer_repo_loc/src."
echo "A fix is required. Stop testing."
exit 1
fi

- name: Create model files
run: |
Expand Down
56 changes: 53 additions & 3 deletions .github/workflows/build-docker-images.yml
Expand Up @@ -39,9 +39,35 @@ jobs:
push: true
tags: huggingface/transformers-all-latest-gpu

latest-with-torch-nightly-docker:
name: "Nightly PyTorch + Stable TensorFlow"
runs-on: ubuntu-latest
steps:
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Check out code
uses: actions/checkout@v2
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: ./docker/transformers-all-latest-gpu
build-args: |
REF=main
PYTORCH=pre
push: true
tags: huggingface/transformers-all-latest-torch-nightly-gpu

latest-torch-deepspeed-docker:
name: "Latest PyTorch + DeepSpeed"
needs: latest-docker
runs-on: ubuntu-latest
steps:
-
Expand All @@ -66,6 +92,32 @@ jobs:
push: true
tags: huggingface/transformers-pytorch-deepspeed-latest-gpu

nightly-torch-deepspeed-docker:
name: "Nightly PyTorch + DeepSpeed"
runs-on: ubuntu-latest
steps:
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Check out code
uses: actions/checkout@v2
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: ./docker/transformers-pytorch-deepspeed-nightly-gpu
build-args: |
REF=main
push: true
tags: huggingface/transformers-pytorch-deepspeed-nightly-gpu

doc-builder:
name: "Doc builder"
runs-on: ubuntu-latest
Expand Down Expand Up @@ -93,7 +145,6 @@ jobs:
latest-pytorch:
name: "Latest PyTorch [dev]"
runs-on: ubuntu-latest
needs: latest-torch-deepspeed-docker
steps:
-
name: Set up Docker Buildx
Expand All @@ -118,7 +169,6 @@ jobs:
tags: huggingface/transformers-pytorch-gpu

latest-tensorflow:
needs: latest-pytorch
name: "Latest TensorFlow [dev]"
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_documentation.yml
Expand Up @@ -15,6 +15,6 @@ jobs:
commit_sha: ${{ github.sha }}
package: transformers
notebook_folder: transformers_doc
languages: en es
languages: en es it pt
secrets:
token: ${{ secrets.HUGGINGFACE_PUSH }}
2 changes: 1 addition & 1 deletion .github/workflows/build_pr_documentation.yml
Expand Up @@ -14,4 +14,4 @@ jobs:
commit_sha: ${{ github.event.pull_request.head.sha }}
pr_number: ${{ github.event.number }}
package: transformers
languages: en es
languages: en es it pt
4 changes: 1 addition & 3 deletions .github/workflows/doctests.yml
Expand Up @@ -32,9 +32,7 @@ jobs:

- name: GPU visibility
run: |
utils/print_env_pt.py
TF_CPP_MIN_LOG_LEVEL=3 python3 -c "import tensorflow as tf; print('TF GPUs available:', bool(tf.config.list_physical_devices('GPU')))"
TF_CPP_MIN_LOG_LEVEL=3 python3 -c "import tensorflow as tf; print('Number of TF GPUs available:', len(tf.config.list_physical_devices('GPU')))"
python3 utils/print_env.py

- name: Prepare files for doctests
run: |
Expand Down
52 changes: 0 additions & 52 deletions .github/workflows/github-torch-hub.yml

This file was deleted.

38 changes: 19 additions & 19 deletions .github/workflows/model-templates.yml
@@ -1,28 +1,16 @@
name: Model templates runner

on:
push:
branches:
- main
pull_request:
paths:
- "src/**"
- "tests/**"
- ".github/**"
- "templates/**"
types: [assigned, opened, synchronize, reopened]
repository_dispatch:
schedule:
- cron: "0 2 * * *"

jobs:
run_tests_templates:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v1

- name: Install Python
uses: actions/setup-python@v1
with:
python-version: 3.6
uses: actions/checkout@v2

- name: Install dependencies
run: |
Expand All @@ -33,14 +21,27 @@ jobs:
id: cache
with:
path: ~/venv/
key: v2-tests_templates-${{ hashFiles('setup.py') }}
key: v4-tests_templates-${{ hashFiles('setup.py') }}

- name: Create virtual environment on cache miss
if: steps.cache.outputs.cache-hit != 'true'
run: |
python -m venv ~/venv && . ~/venv/bin/activate
pip install --upgrade pip!=21.3
pip install .[dev]
pip install -e .[dev]

- name: Check transformers location
# make `transformers` available as package (required since we use `-e` flag) and check it's indeed from the repo.
run: |
. ~/venv/bin/activate
python setup.py develop
transformer_loc=$(pip show transformers | grep "Location: " | cut -c11-)
transformer_repo_loc=$(pwd .)
if [ "$transformer_loc" != "$transformer_repo_loc/src" ]; then
echo "transformers is from $transformer_loc but it shoud be from $transformer_repo_loc/src."
echo "A fix is required. Stop testing."
exit 1
fi

- name: Create model files
run: |
Expand All @@ -65,7 +66,6 @@ jobs:

- name: Run style changes
run: |
git fetch origin main:main
. ~/venv/bin/activate
make style && make quality && make repo-consistency

Expand Down