Sylvain Gugger
06886d5a68
Only resize embeddings when necessary ( #20043 )
...
* Only resize embeddings when necessary
* Add comment
2022-11-03 12:05:04 -04:00
Sylvain Gugger
c3a93d8d82
v4.25.0.dev0
2022-10-31 21:48:40 -04:00
Lysandre
10100979ed
Dev version
2022-10-10 17:25:40 -04:00
Santiago Castro
06f341de4f
Add a missing space in a script arg documentation ( #19113 )
2022-09-20 21:43:32 +02:00
Lysandre
16913b3c92
Dev version
2022-09-14 14:58:20 -04:00
Rahul A R
00fc9217d1
Fixed bug which caused overwrite_cache to always be True ( #19000 )
...
* fixed bug which caused overwrite_cache to always be True (#18967 ).
* reformatting changes
2022-09-13 11:29:48 -04:00
Nicholas Broad
4f299b2446
Accelerator end training ( #18910 )
...
* add accelerator.end_training()
Some trackers need this to end their runs.
* fixup and quality
* add space
* add space again ?!?
2022-09-07 07:46:26 -04:00
Sylvain Gugger
c61f116b63
Tie weights after preparing the model in run_clm ( #18855 )
2022-09-01 12:06:56 -04:00
Rahul A R
e9442440fc
streamlining 'checkpointing_steps' parsing ( #18755 )
2022-08-25 11:00:38 -04:00
Atharva Ingle
d90a36d192
remove check for main process for trackers initialization ( #18706 )
2022-08-22 11:16:27 -04:00
Atharva Ingle
e54a1b49aa
model.tie_weights()
should be applied after accelerator.prepare()
(#18676 )
...
* `model.tie_weights()` should be applied after `accelerator.prepare`
Weight tying should be done after the model has been moved to XLA device as mentioned on PyTorch/XLA Troubleshooting guide [here](https://github.com/pytorch/xla/blob/master/TROUBLESHOOTING.md#xla-tensor-quirks )
* format code
2022-08-18 13:46:57 -04:00
Zachary Mueller
358fc18613
Add evaluate to examples requirements ( #18666 )
2022-08-18 10:57:39 -04:00
zhoutang776
25e651a2de
Update run_translation_no_trainer.py ( #18637 )
...
* Update run_translation_no_trainer.py
found an error in selecting `no_decay` parameters and some small modifications when the user continues to train from a checkpoint
* fixs `no_decay` and `resume_step` issue
1. change `no_decay` list
2. if use continue to train their model from provided checkpoint, the `resume_step` will not be initialized properly if `args.gradient_accumulation_steps != 1`
2022-08-16 13:25:57 -04:00
Rasmus Arpe Fogh Jensen
a765b68aa6
Update no_trainer.py scripts to include accelerate gradient accumulation wrapper ( #18473 )
...
* Added accelerate gradient accumulation wrapper to run_image_classification_no_trainer.py example script
* make fixup changes
* PR comments
* changed input to Acceletor based on PR comment, ran make fixup
* Added comment explaining the sync_gradients statement
* Fixed lr scheduler max steps
* Changed run_clm_no_trainer.py script to use accelerate gradient accum wrapper
* Fixed all scripts except wav2vec2 pretraining to use accelerate gradient accum wrapper
* Added accelerate gradient accum wrapper for wav2vec2_pretraining_no_trainer.py script
* make fixup and lr_scheduler step inserted back into run_qa_beam_search_no_trainer.py
* removed changes to run_wav2vec2_pretraining_no_trainer.py script and fixed using wrong constant in qa_beam_search_no_trainer.py script
2022-08-08 15:52:47 -04:00
Julien Chaumond
9129fd0377
transformers-cli login
=> huggingface-cli login
(#18490 )
...
* zero chance anyone's using that constant no?
* `transformers-cli login` => `huggingface-cli login`
* `transformers-cli repo create` => `huggingface-cli repo create`
* `make style`
2022-08-06 09:42:55 +02:00
Ritik Nandwal
3db4378bd7
Update no trainer scripts for language modeling and image classification examples ( #18443 )
...
* Update no_trainer script for image-classification
* Update no_trainer scripts for language-modeling examples
* Remove unused variable
* Removing truncation from losses array for language modeling examples
2022-08-03 08:33:18 -04:00
Sylvain Gugger
941d233153
Fix ROUGE add example check and update README ( #18398 )
...
* Fix ROUGE add example check and update README
* Stay consistent in values
2022-08-01 11:14:49 -04:00
atturaioe
1f84399171
Migrate metric to Evaluate in Pytorch examples ( #18369 )
...
* Migrate metric to Evaluate in pytorch examples
* Remove unused imports
2022-08-01 07:40:25 -04:00
Lysandre
c89a592e87
Dev version
2022-07-27 17:13:57 +02:00
Zachary Mueller
75259b44bf
Properly calculate the total train iterations and recalculate num epochs in no_trainer scripts ( #17856 )
2022-06-23 15:46:01 -04:00
Sylvain Gugger
7c6ec195ad
v4.21.0.dev0
2022-06-16 12:20:53 -04:00
Sylvain Gugger
3cab90279f
Add examples telemetry ( #17552 )
...
* Add examples telemetry
* Alternative approach
* Add to all other examples
* Add to templates as well
* Put framework separately
* Same for TensorFlow
2022-06-07 11:57:52 -04:00
Sourab Mangrulkar
d156898f3b
Improve notrainer examples ( #17449 )
...
* improve no-trainer examples
* Trigger CI
* adding comment to clarify tracker init on main process
* Trigger CI
* Trigger CI
* Trigger CI
2022-05-28 00:06:31 +05:30
Sylvain Gugger
afe5d42d8d
Black preview ( #17217 )
...
* Black preview
* Fixup too!
* Fix check copies
* Use the same version as the CI
* Bump black
2022-05-12 16:25:55 -04:00
Lysandre Debut
5294fa12ee
Dev version
2022-05-12 11:04:23 -04: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
Zachary Mueller
60e1d883f1
Fixup no_trainer save logic ( #16968 )
...
* Fixup all examples
2022-04-27 14:46:49 -04:00
Sylvain Gugger
c79bbc3ba5
Fix multiple deletions of the same files in save_pretrained ( #16947 )
...
* Fix multiple deletions of the same files in save_pretrained
* Add is_main_process argument
2022-04-27 12:28:42 -04:00
Zachary Mueller
be752d12f8
Fixup no_trainer examples scripts and add more tests ( #16765 )
...
* Change tracking to store_true
* Remove step param and use it in the log dictionary directly
* use vars(args) when passing args to init_trackers
* Include tracking tests since tensorboard is already a dep
2022-04-13 14:40:48 -04:00
Zachary Mueller
d4b3e359aa
Don't push checkpoints to hub in no_trainer
scripts ( #16703 )
...
Adds checkpoint prefixes to the gitignore if `push_to_hub` is used along with `checkpointint_steps`
2022-04-11 12:42:45 -04:00
Zachary Mueller
d57da99237
Add tests for no_trainer and fix existing examples ( #16656 )
...
* Fixed some bugs involving saving during epochs
* Added tests mimicking the existing examples tests
* Added in json exporting to all `no_trainer` examples for consistency
2022-04-08 10:03:56 -04:00
Zachary Mueller
febe42b5da
Update no_trainer scripts with new Accelerate functionalities ( #16617 )
...
Adds logging and save/loading to the Accelerate scripts
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-04-06 15:29:32 -04:00
Lysandre Debut
a180efe7fd
Dev version
2022-04-06 11:08:12 -04:00
Karim Foda
24a85cca61
Add use_auth to load_datasets for private datasets to PT and TF examples ( #16521 )
...
* fix formatting and remove use_auth
* Add use_auth_token to Flax examples
2022-04-04 10:27:45 -04:00
Stas Bekman
a73281e3e4
[examples] max samples can't be bigger than the len of dataset ( #16501 )
...
* [examples] max samples can't be bigger than then len of dataset
* do tf and flax
2022-03-30 12:33:16 -07:00
Sylvain Gugger
4975002df5
Reorganize file utils ( #16264 )
...
* Split file_utils in several submodules
* Fixes
* Add back more objects
* More fixes
* Who exactly decided to import that from there?
* Second suggestion to code with code review
* Revert wront move
* Fix imports
* Adapt all imports
* Adapt all imports everywhere
* Revert this import, will fix in a separate commit
2022-03-23 10:26:33 -04:00
Lysandre Debut
eca77f4719
Updates the default branch from master to main ( #16326 )
...
* Updates the default branch from master to main
* Links from `master` to `main`
* Typo
* Update examples/flax/README.md
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-03-23 03:46:59 -04:00
Sylvain Gugger
19597998f6
Don't compute metrics in LM examples on TPU ( #16029 )
2022-03-10 07:44:51 -05:00
davidleonfdez
c0281feb50
Fix #15898 ( #15928 )
2022-03-03 14:41:03 -05:00
Sylvain Gugger
79d28e80b6
v4.18.0.dev.0
2022-03-03 10:19:58 -05:00
Patrick von Platen
3d5dea9bf0
Add example batch size to all commands ( #15596 )
2022-02-10 08:52:07 -05:00
davidleonfdez
f1a4c4ead5
[WIP] Add preprocess_logits_for_metrics Trainer param ( #15473 )
...
* Add preprocess_logits_for_metrics Trainer param
* Compute accuracy in LM examples
* Improve comments
2022-02-03 12:07:20 -05:00
Lysandre
eab338104d
Docs for version v4.16.0
2022-01-27 13:11:51 -05:00
Lysandre
f87db5e412
Release: v4.16.0
2022-01-27 13:06:33 -05:00
Patrick von Platen
fa39ff9fc4
Docs for v4.16.0dev0
2021-12-22 20:39:44 +01:00
Patrick von Platen
05fa1a7ac1
Release: v4.15.0
2021-12-22 18:43:15 +01:00
Lysandre
7c9c41f43c
Docs for v4.14.0
2021-12-15 18:29:53 +01:00
Lysandre
960d8cb41d
Release: v4.14.0
2021-12-15 18:20:35 +01:00
Josué Nascimento
971e36667a
Change how to load config of XLNetLMHeadModel ( #14746 )
2021-12-13 12:34:26 -05:00