Thomas Wolf
87200dc3a7
WIP templating
2020-09-17 14:27:46 +02:00
Thomas Wolf
7eb3deee13
WIP
2020-09-14 21:59:44 +02:00
Sam Shleifer
0fab39695a
[s2s distill] allow pegasus-12-12 ( #7104 )
2020-09-14 00:03:59 -04:00
Sam Shleifer
de9e297964
[s2s] distributed eval cleanup ( #7110 )
2020-09-13 23:40:38 -04:00
Sam Shleifer
e7f8d2ab64
[s2s] two stage run_distributed_eval.py ( #7105 )
2020-09-13 17:28:18 -04:00
Sam Shleifer
b76cb1c3df
[s2s] run_eval supports --prefix clarg. ( #6953 )
2020-09-12 01:08:21 -04:00
Sam Shleifer
77950c485a
[wip/s2s] DistributedSortishSampler ( #7056 )
2020-09-10 15:23:44 -04:00
Sylvain Gugger
514486739c
Fix CI with change of name of nlp ( #7054 )
...
* nlp -> datasets
* More nlp -> datasets
* Woopsie
* More nlp -> datasets
* One last
2020-09-10 14:51:08 -04:00
Sam Shleifer
e9a2f772bc
[s2s] --eval_max_generate_length ( #7018 )
2020-09-10 14:11:34 -04:00
Manuel Romero
1b76936d1a
Fix typo ( #6994 )
2020-09-08 04:22:57 -04:00
Lysandre
1650130b0f
Remove misleading docstring
2020-09-07 14:16:59 +02:00
995a958dd1
feat: allow prefix for any generative model ( #5885 )
...
* feat: allow padding_text for any generative model
* docs(pipelines.py): correct typo
* Update src/transformers/pipelines.py
Co-authored-by: Sam Shleifer <sshleifer@gmail.com >
* feat: rename padding_text to prefix
* fix: cannot tokenize empty text
* fix: pass prefix arg to pipeline
* test: add prefix to text-generetation pipeline
* style: fix style
* style: clean code and variable name more explicit
* set arg docstring to optional
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com >
Co-authored-by: Sam Shleifer <sshleifer@gmail.com >
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com >
2020-09-07 03:03:45 -04:00
Sam Shleifer
ce37be9d94
[s2s] warn if --fp16 for torch 1.6 ( #6977 )
2020-09-06 20:41:29 -04:00
Stas Bekman
48ff6d5109
[doc] remove the implied defaults to :obj:None, s/True/ :obj:`True/, etc. ( #6956 )
...
* remove the implied defaults to :obj:`None`
* fix bug in the original
* replace to :obj:`True`, :obj:`False`
2020-09-04 18:22:25 -04:00
Sam Shleifer
a4fc0c80b1
[s2s] run_eval.py parses generate_kwargs ( #6948 )
2020-09-04 14:19:31 -04:00
Sam Shleifer
6078b12098
[s2s] distill: --normalize_hidden --supervise_forward ( #6834 )
2020-09-04 14:05:56 -04:00
Sam Shleifer
e95d262f25
[s2s] support early stopping based on loss, rather than rouge ( #6927 )
2020-09-03 17:31:35 -04:00
Sam Shleifer
207ed8cb78
[s2s] use --eval_beams command line arg ( #6926 )
2020-09-03 12:42:09 -04:00
Sam Shleifer
39ed68d597
[s2s] allow task_specific_params=summarization_xsum ( #6923 )
2020-09-03 11:11:40 -04:00
Sam Shleifer and Sylvain Gugger
5a318f075a
[s2s]: script to convert pl checkpoints to hf checkpoints ( #6911 )
...
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com >
2020-09-03 09:47:00 -04:00
brett koonce
b8e4906c97
tweak tar command in readme ( #6919 )
2020-09-03 09:29:01 -04:00
Jin Young (Daniel) Sohn
21d719238c
Add cache_dir to save features TextDataset ( #6879 )
...
* Add cache_dir to save features TextDataset
This is in case the dataset is in a RO filesystem, for which is the case
in tests (GKE TPU tests).
* style
2020-09-01 11:42:17 -04:00
Sam Shleifer
431ab19d7a
[fix] typo in available in helper function ( #6859 )
2020-08-31 17:59:34 -04:00
Sam Shleifer
b9772897ec
[s2s] command line args for faster val steps ( #6833 )
2020-08-31 16:16:10 -04:00
Sam Shleifer
61b7ba93f5
Marian distill scripts + integration test ( #6799 )
2020-08-31 13:48:26 -04:00
Sam Shleifer
dfa10a41ba
[s2s README] Add more dataset download instructions ( #6737 )
2020-08-30 16:29:24 -04:00
xujiaze13 and Kevin Canwen Xu
32fe44086c
clearly indicate shuffle=False ( #6312 )
...
* Clarify shuffle
* clarify shuffle
Co-authored-by: Kevin Canwen Xu <canwenxu@126.com >
2020-08-30 19:26:10 +08:00
Sam Shleifer
0f58903bb6
Pegasus finetune script: add --adafactor ( #6811 )
2020-08-29 17:43:32 -04:00
Sam Shleifer
ac47458a02
[s2s] round runtime in run_eval ( #6798 )
2020-08-29 17:36:31 -04:00
Sam Shleifer
5ab21b072f
[s2s] Test hub configs in self-scheduled CI ( #6809 )
2020-08-28 17:05:52 -04:00
Sam Shleifer
9336086ab5
prepare_seq2seq_batch makes labels/ decoder_input_ids made later. ( #6654 )
...
* broken test
* batch parity
* tests pass
* boom boom
* boom boom
* split out bart tokenizer tests
* fix tests
* boom boom
* Fixed dataset bug
* Fix marian
* Undo extra
* Get marian working
* Fix t5 tok tests
* Test passing
* Cleanup
* better assert msg
* require torch
* Fix mbart tests
* undo extra decoder_attn_mask change
* Fix import
* pegasus tokenizer can ignore src_lang kwargs
* unused kwarg test cov
* boom boom
* add todo for pegasus issue
* cover one word translation edge case
* Cleanup
* doc
2020-08-28 11:15:17 -04:00
Sam Shleifer
fb78a90d6a
PL: --adafactor option ( #6776 )
2020-08-27 22:19:46 -04:00
Tom Grek
c225e872ed
Fix it to work with BART ( #6756 )
2020-08-27 09:04:50 -04:00
Julien Plu
6f289dc97a
Fix the TF Trainer gradient accumulation and the TF NER example ( #6713 )
...
* Align TF NER example over the PT one
* Fix Dataset call
* Fix gradient accumulation training
* Apply style
* Address Sylvain's comments
* Address Sylvain's comments
* Apply style
2020-08-27 08:45:34 -04:00
Sam Shleifer
4bd7be9a42
s2s distillation uses AutoModelForSeqToSeqLM ( #6761 )
2020-08-26 23:25:11 -04:00
Sam Shleifer
61518e2df3
[s2s] run_eval.py QOL improvements and cleanup( #6746 )
2020-08-26 18:59:20 -04:00
Lysandre
a75c64d80c
Black 20 release
2020-08-26 17:20:22 +02:00
Joel Hanson
4db2fa77d7
Allow tests in examples to use cuda or fp16,if they are available ( #5512 )
...
* Allow tests in examples to use cuda or fp16,if they are available
The tests in examples didn't use the cuda or fp16 even if they where available.
- The text classification example (`run_glue.py`) didn't use the fp16 even if it was available but
the device was take based on the availablity(cuda/cpu).
- The language-modeling example (`run_language_modeling.py`) was having `--no_cuda` argument
which made the test to work without cuda. This example is having issue when running with fp16
thus it not enabled (got an assertion error for perplexity due to it higher value).
- The cuda and fp16 is not enabled for question-answering example (`run_squad.py`) as it is having a
difference in the f1 score.
- The text-generation example (`run_generation.py`) will take the cuda or fp16 whenever it is available.
Resolves some of: #5057
* Unwanted import of is_apex_available was removed
* Made changes to test examples file to have the pass --fp16 only if cuda and apex is avaliable
- run_glue.py: Removed the check for cuda and fp16.
- run_generation.py: Removed the check for cuda and fp16 also removed unwanted flag creation.
* Incorrectly sorted imports fixed
* The model needs to be converted to half precision
* Formatted single line if condition statement to multiline
* The torch_device also needed to be checked before running the test on examples
- The tests in examples which uses cuda should also depend from the USE_CUDA flag,
similarly to the rest of the test suite. Even if we decide to set USE_CUDA to
True by default, setting USE_CUDA to False should result in the examples not using CUDA
* Format some of the code in test_examples file
* The improper import of is_apex_available was sorted
* Formatted the code to keep the style standards
* The comma at the end of list giving a flake8 issue was fixed
* Import sort was fixed
* Removed the clean_test_dir function as its not used right now
2020-08-25 06:02:07 -04:00
Sam Shleifer
0344428f79
[s2s] round bleu, rouge to 4 digits ( #6704 )
2020-08-25 00:33:11 -04:00
vblagoje
dd522da004
Fix PL token classification examples ( #6682 )
2020-08-24 11:30:06 -04:00
Sylvain Gugger
a573777901
Update repo to isort v5 ( #6686 )
...
* Run new isort
* More changes
* Update CI, CONTRIBUTING and benchmarks
2020-08-24 11:03:01 -04:00
Suraj Patil
6f972e1423
update xnli-mt url ( #6580 )
2020-08-18 13:10:47 -04:00
Sam Shleifer
d2da2cb232
allow spaces in bash args with "$@" ( #6521 )
2020-08-17 09:06:35 -04:00
Stas Bekman
9dbe4094f2
[testing] a new TestCasePlus subclass + get_auto_remove_tmp_dir() ( #6494 )
...
* [testing] switch to a new TestCasePlus + get_auto_remove_tmp_dir() for auto-removal of tmp dirs
* respect after=True for tempfile, simplify code
* comments
* comment fix
* put `before` last in args, so can make debug even faster
2020-08-17 08:12:19 -04:00
Sam Shleifer
84c265ffcc
[lightning_base] fix s2s logging, only make train_loader once ( #6404 )
2020-08-16 22:49:41 -04:00
Sam Shleifer
72add6c98f
[s2s] docs, document desired filenames nicely ( #6525 )
2020-08-16 20:31:22 -04:00
Kyle Piira
2060181126
Fixes paths with spaces in seq2seq example ( #6493 )
2020-08-16 13:36:38 -04:00
Kevin Canwen Xu
eb613b566a
Use hash to clean the test dirs ( #6475 )
...
* Use hash to clean the test dirs
* Use hash to clean the test dirs
* Use hash to clean the test dirs
* fix
2020-08-14 15:34:39 +08:00
Kevin Canwen Xu
7bc00569df
Clean directory after script testing ( #6453 )
...
* Clean Dir after testing
* remove pabee ignore
2020-08-14 00:34:03 +08:00
Sam Shleifer
e92efcf728
Mult rouge by 100: standard units ( #6359 )
2020-08-13 12:15:54 -04:00