1. 14 May, 2020 2 commits
  2. 13 May, 2020 2 commits
  3. 12 May, 2020 1 commit
    • Viktor Alm's avatar
      Add MultipleChoice to TFTrainer [WIP] (#4270) · e4512aab
      Viktor Alm authored
      
      
      * catch gpu len 1 set to gpu0
      
      * Add mpc to trainer
      
      * Add MPC for TF
      
      * fix TF automodel for MPC and add Albert
      
      * Apply style
      
      * Fix import
      
      * Note to self: double check
      
      * Make shape None, None for datasetgenerator output shapes
      
      * Add from_pt bool which doesnt seem to work
      
      * Original checkpoint dir
      
      * Fix docstrings for automodel
      
      * Update readme and apply style
      
      * Colab should probably not be from users
      
      * Colabs should probably not be from users
      
      * Add colab
      
      * Update README.md
      
      * Update README.md
      
      * Cleanup __intit__
      
      * Cleanup flake8 trailing comma
      
      * Update src/transformers/training_args_tf.py
      
      * Update src/transformers/modeling_tf_auto.py
      Co-authored-by: default avatarViktor Alm <viktoralm@pop-os.localdomain>
      Co-authored-by: default avatarJulien Chaumond <chaumond@gmail.com>
      e4512aab
  4. 11 May, 2020 1 commit
  5. 08 May, 2020 1 commit
  6. 07 May, 2020 5 commits
  7. 06 May, 2020 2 commits
    • Julien Plu's avatar
      TF version of the trainer (#4017) · aad50151
      Julien Plu authored
      * First commit to add a TF version of the trainer.
      
      * Make the TF trainer closer to what looks the PT trainer
      
      * Refactoring common code between the PT and TF trainer into an util file.
      
      * Some bugfix + better similarity with the PT trainer
      
      * Add missing class in transformers init
      
      * Bugfix over prediction + use classification report instead of simple metrics
      
      * Fix name error
      
      * Fix optimization tests + style
      
      * Apply style
      
      * Several bugfix for multi-gpu training
      
      * Apply style
      
      * Apply style
      
      * Add glue example for the TF trainer
      
      * Several bugix + address the reviews
      
      * Fix on the TF training args file
      
      * Add a debug mode
      
      * Bugfix in utils_ner.py when segment_ids is None
      
      * Apply style
      
      * Apply style
      
      * Add TPU strategy
      
      * Fix selection strategy
      aad50151
    • Simone Primarosa's avatar
  8. 02 May, 2020 3 commits
  9. 01 May, 2020 1 commit
  10. 29 Apr, 2020 1 commit
    • Julien Chaumond's avatar
      CDN urls (#4030) · 455c6390
      Julien Chaumond authored
      * [file_utils] use_cdn + documentation
      
      * Move to cdn. urls for weights
      
      * [urls] Hotfix for bert-base-japanese
      455c6390
  11. 28 Apr, 2020 2 commits
  12. 24 Apr, 2020 2 commits
  13. 22 Apr, 2020 2 commits
    • Julien Chaumond's avatar
      Fixes #3877 · 1dc9b3c7
      Julien Chaumond authored
      1dc9b3c7
    • Julien Chaumond's avatar
      Trainer (#3800) · dd9d483d
      Julien Chaumond authored
      * doc
      
      * [tests] Add sample files for a regression task
      
      * [HUGE] Trainer
      
      * Feedback from @sshleifer
      
      * Feedback from @thomwolf + logging tweak
      
      * [file_utils] when downloading concurrently, get_from_cache will use the cached file for subsequent processes
      
      * [glue] Use default max_seq_length of 128 like before
      
      * [glue] move DataTrainingArguments around
      
      * [ner] Change interface of InputExample, and align run_{tf,pl}
      
      * Re-align the pl scripts a little bit
      
      * ner
      
      * [ner] Add integration test
      
      * Fix language_modeling with API tweak
      
      * [ci] Tweak loss target
      
      * Don't break console output
      
      * amp.initialize: model must be on right device before
      
      * [multiple-choice] update for Trainer
      
      * Re-align to 827d6d6e
      dd9d483d
  14. 20 Apr, 2020 3 commits
  15. 18 Apr, 2020 1 commit
    • Thomas Wolf's avatar
      Cleanup fast tokenizers integration (#3706) · 827d6d6e
      Thomas Wolf authored
      
      
      * First pass on utility classes and python tokenizers
      
      * finishing cleanup pass
      
      * style and quality
      
      * Fix tests
      
      * Updating following @mfuntowicz comment
      
      * style and quality
      
      * Fix Roberta
      
      * fix batch_size/seq_length inBatchEncoding
      
      * add alignement methods + tests
      
      * Fix OpenAI and Transfo-XL tokenizers
      
      * adding trim_offsets=True default for GPT2 et RoBERTa
      
      * style and quality
      
      * fix tests
      
      * add_prefix_space in roberta
      
      * bump up tokenizers to rc7
      
      * style
      
      * unfortunately tensorfow does like these - removing shape/seq_len for now
      
      * Update src/transformers/tokenization_utils.py
      Co-Authored-By: default avatarStefan Schweter <stefan@schweter.it>
      
      * Adding doc and docstrings
      
      * making flake8 happy
      Co-authored-by: default avatarStefan Schweter <stefan@schweter.it>
      827d6d6e
  16. 16 Apr, 2020 3 commits
  17. 15 Apr, 2020 1 commit
  18. 14 Apr, 2020 1 commit
  19. 13 Apr, 2020 1 commit
  20. 10 Apr, 2020 5 commits
    • Jin Young Sohn's avatar
    • Jin Young Sohn's avatar
      Add `run_glue_tpu.py` that trains models on TPUs (#3702) · 551b4505
      Jin Young Sohn authored
      * Initial commit to get BERT + run_glue.py on TPU
      
      * Add README section for TPU and address comments.
      
      * Cleanup TPU bits from run_glue.py (#3)
      
      TPU runner is currently implemented in:
      https://github.com/pytorch-tpu/transformers/blob/tpu/examples/run_glue_tpu.py.
      
      We plan to upstream this directly into `huggingface/transformers`
      (either `master` or `tpu`) branch once it's been more thoroughly tested.
      
      * Cleanup TPU bits from run_glue.py
      
      TPU runner is currently implemented in:
      https://github.com/pytorch-tpu/transformers/blob/tpu/examples/run_glue_tpu.py
      
      .
      
      We plan to upstream this directly into `huggingface/transformers`
      (either `master` or `tpu`) branch once it's been more thoroughly tested.
      
      * No need to call `xm.mark_step()` explicitly (#4)
      
      Since for gradient accumulation we're accumulating on batches from
      `ParallelLoader` instance which on next() marks the step itself.
      
      * Resolve R/W conflicts from multiprocessing (#5)
      
      * Add XLNet in list of models for `run_glue_tpu.py` (#6)
      
      * Add RoBERTa to list of models in TPU GLUE (#7)
      
      * Add RoBERTa and DistilBert to list of models in TPU GLUE (#8)
      
      * Use barriers to reduce duplicate work/resources (#9)
      
      * Shard eval dataset and aggregate eval metrics (#10)
      
      * Shard eval dataset and aggregate eval metrics
      
      Also, instead of calling `eval_loss.item()` every time do summation with
      tensors on device.
      
      * Change defaultdict to float
      
      * Reduce the pred, label tensors instead of metrics
      
      As brought up during review some metrics like f1 cannot be aggregated
      via averaging. GLUE task metrics depends largely on the dataset, so
      instead we sync the prediction and label tensors so that the metrics can
      be computed accurately on those instead.
      
      * Only use tb_writer from master (#11)
      
      * Apply huggingface black code formatting
      
      * Style
      
      * Remove `--do_lower_case` as example uses cased
      
      * Add option to specify tensorboard logdir
      
      This is needed for our testing framework which checks regressions
      against key metrics writtern by the summary writer.
      
      * Using configuration for `xla_device`
      
      * Prefix TPU specific comments.
      
      * num_cores clarification and namespace eval metrics
      
      * Cache features file under `args.cache_dir`
      
      Instead of under `args.data_dir`. This is needed as our test infra uses
      data_dir with a read-only filesystem.
      
      * Rename `run_glue_tpu` to `run_tpu_glue`
      Co-authored-by: default avatarLysandreJik <lysandre.debut@reseau.eseo.fr>
      551b4505
    • Julien Chaumond's avatar
    • Julien Chaumond's avatar
      [examples] Generate argparsers from type hints on dataclasses (#3669) · b169ac9c
      Julien Chaumond authored
      * [examples] Generate argparsers from type hints on dataclasses
      
      * [HfArgumentParser] way simpler API
      
      * Restore run_language_modeling.py for easier diff
      
      * [HfArgumentParser] final tweaks from code review
      b169ac9c
    • Julien Chaumond's avatar
      Big cleanup of `glue_convert_examples_to_features` (#3688) · f98d0ef2
      Julien Chaumond authored
      * Big cleanup of `glue_convert_examples_to_features`
      
      * Use batch_encode_plus
      
      * Cleaner wrapping of glue_convert_examples_to_features for TF
      
      @lysandrejik
      
      * Cleanup syntax, thanks to @mfuntowicz
      
      * Raise explicit error in case of user error
      f98d0ef2