1. 26 Oct, 2020 10 commits
    • Sylvain Gugger's avatar
      Doc styling (#8067) · 08f534d2
      Sylvain Gugger authored
      * Important files
      
      * Styling them all
      
      * Revert "Styling them all"
      
      This reverts commit 7d029395fdae8513b8281cbc2a6c239f8093503e.
      
      * Syling them for realsies
      
      * Fix syntax error
      
      * Fix benchmark_utils
      
      * More fixes
      
      * Fix modeling auto and script
      
      * Remove new line
      
      * Fixes
      
      * More fixes
      
      * Fix more files
      
      * Style
      
      * Add FSMT
      
      * More fixes
      
      * More fixes
      
      * More fixes
      
      * More fixes
      
      * Fixes
      
      * More fixes
      
      * More fixes
      
      * Last fixes
      
      * Make sphinx happy
      08f534d2
    • Sylvain Gugger's avatar
      Doc fixes in preparation for the docstyle PR (#8061) · 04a17f85
      Sylvain Gugger authored
      * Fixes in preparation for doc styling
      
      * More fixes
      
      * Better syntax
      
      * Fixes
      
      * Style
      
      * More fixes
      
      * More fixes
      04a17f85
    • Lysandre Debut's avatar
      3a107645
    • Sam Shleifer's avatar
    • Stas Bekman's avatar
      fixing crash (#8057) · 7ff7c493
      Stas Bekman authored
      7ff7c493
    • Lysandre Debut's avatar
      Fix + Test (#8049) · cbad90d8
      Lysandre Debut authored
      cbad90d8
    • noise-field's avatar
      Mlflow integration callback (#8016) · c48b16b8
      noise-field authored
      * Add MLflow integration class
      
      Add integration code for MLflow in integrations.py along with the code
      that checks that MLflow is installed.
      
      * Add MLflowCallback import
      
      Add import of MLflowCallback in trainer.py
      
      * Handle model argument
      
      Allow the callback to handle model argument and store model config items as hyperparameters.
      
      * Log parameters to MLflow in batches
      
      MLflow cannot log more than a hundred parameters at once.
      Code added to split the parameters into batches of 100 items and log the batches one by one.
      
      * Fix style
      
      * Add docs on MLflow callback
      
      * Fix issue with unfinished runs
      
      The "fluent" api used in MLflow integration allows only one run to be active at any given moment. If the Trainer is disposed off and a new one is created, but the training is not finished, it will refuse to log the results when the next trainer is created.
      
      * Add MLflow integration class
      
      Add integration code for MLflow in integrations.py along with the code
      that checks that MLflow is installed.
      
      * Add MLflowCallback import
      
      Add import of MLflowCallback in trainer.py
      
      * Handle model argument
      
      Allow the callback to handle model argument and store model config items as hyperparameters.
      
      * Log parameters to MLflow in batches
      
      MLflow cannot log more than a hundred parameters at once.
      Code added to split the parameters into batches of 100 items and log the batches one by one.
      
      * Fix style
      
      * Add docs on MLflow callback
      
      * Fix issue with unfinished runs
      
      The "fluent" api used in MLflow integration allows only one run to be active at any given moment. If the Trainer is disposed off and a new one is created, but the training is not finished, it will refuse to log the results when the next trainer is created.
      c48b16b8
    • Lysandre Debut's avatar
      Tiny TF Bart fixes (#8023) · 8be9cb0a
      Lysandre Debut authored
      8be9cb0a
    • luyug's avatar
      Add mixed precision evaluation (#8036) · c153bcc5
      luyug authored
      * Add mixed precision evaluation
      
      * use original flag
      c153bcc5
    • Thomas Wolf's avatar
      [tokenizers] Fixing #8001 - Adding tests on tokenizers serialization (#8006) · 79eb3915
      Thomas Wolf authored
      * fixing #8001
      
      * make T5 tokenizer serialization more robust - style
      79eb3915
  2. 24 Oct, 2020 1 commit
  3. 23 Oct, 2020 3 commits
  4. 22 Oct, 2020 11 commits
  5. 21 Oct, 2020 5 commits
  6. 20 Oct, 2020 4 commits
    • Lysandre's avatar
      Release: v3.4.0 · eb0e0ce2
      Lysandre authored
      eb0e0ce2
    • Shai Erera's avatar
      Fix bug in _sorted_checkpoints (#7880) · 048dd6cf
      Shai Erera authored
      I'm using transformers 3.3.1 and run a training script with `--save_total_limit 3`. I hit the exception below, and after debugging the code found that it wrongly tries to index into the `best_model_checkpoint`'s *str* rather than the `sorted_checkpoints` array. When running without the fix I got this exception:
      
      ```
      Traceback (most recent call last):
        File "/<HOME>/.conda/envs/transformers/lib/python3.7/site-packages/transformers/trainer.py", line 921, in _save_training
          self._rotate_checkpoints(use_mtime=True)
        File "/<HOME>/.conda/envs/transformers/lib/python3.7/site-packages/transformers/trainer.py", line 1283, in _rotate_checkpoints
          checkpoints_sorted = self._sorted_checkpoints(use_mtime=use_mtime)
        File "/<HOME>/.conda/envs/transformers/lib/python3.7/site-packages/transformers/trainer.py", line 1274, in _sorted_checkpoints
          checkpoints_sorted[best_model_index],
      TypeError: 'str' object does not support item assignment
      ```
      048dd6cf
    • Sylvain Gugger's avatar
      Add Flax dummy objects (#7918) · 6d4f8bd0
      Sylvain Gugger authored
      6d4f8bd0
    • Stas Bekman's avatar
      [testing] rename skip targets + docs (#7863) · 3e31e7f9
      Stas Bekman authored
      
      
      * rename skip targets + docs
      
      * fix quotes
      
      * style
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * small improvements
      
      * fix
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      3e31e7f9
  7. 19 Oct, 2020 6 commits
    • Patrick von Platen's avatar
      [EncoderDecoder] Fix Typo (#7915) · c912ba5f
      Patrick von Platen authored
      * fix encoder decoder models
      
      * add .gitignore
      c912ba5f
    • Bram Vanroy's avatar
      Raise error when using AMP on non-CUDA device (#7869) · 55bcd0cb
      Bram Vanroy authored
      * Raise error when using AMP on non-CUDA device
      
      * make style
      
      * make style
      55bcd0cb
    • Ayub Subhaniya's avatar
      `decoder_config` used before intialisation (#7903) · df1ddced
      Ayub Subhaniya authored
      Seeing error when sending `decoder_config` as a parameter while initializing a encoder-decoder model from pretrained. 
      fixed "UnboundLocalError: local variable 'decoder_config' referenced before assignment"
      df1ddced
    • Quentin Lhoest's avatar
      Allow Custom Dataset in RAG Retriever (#7763) · 033f29c6
      Quentin Lhoest authored
      * add CustomHFIndex
      
      * typo in config
      
      * update tests
      
      * add custom dataset example
      
      * clean script
      
      * update test data
      
      * minor in test
      
      * docs
      
      * docs
      
      * style
      
      * fix imports
      
      * allow to pass the indexed dataset directly
      
      * update tests
      
      * use multiset DPR
      
      * address thom and patrick's comments
      
      * style
      
      * update dpr tokenizer
      
      * add output_dir flag in use_own_knowledge_dataset.py
      
      * allow custom datasets in examples/rag/finetune.py
      
      * add test for custom dataset in distributed rag retriever
      033f29c6
    • Julien Rossi's avatar
      Trainer with Iterable Dataset (#7858) · a09fe140
      Julien Rossi authored
      * fix 5990
      
      * accomodate iterable dataset without predefined length
      * set it as 1 use case: provide max_steps, and NO num_epochs
      * Is a merge of master and PR 5995
      
      * fix trainer test under TF
      
      * fix only for torch
      * TF trainer untouched
      * trainer tests are skipped when no torch
      
      * address comments
      
      * fix quality checks
      
      * remove torch.dataset from test_trainer
      
      * unnecessary inheritance
      * RegressionDataset implements all needed methods __len__ and __getitem__
      
      * fix quality checks
      
      * restore RegressionDataset
      
      * was wrongly under is_torch_available()
      a09fe140
    • Weizhen's avatar
      ProphetNet (#7157) · 2422cda0
      Weizhen authored
      
      
      * add new model prophetnet
      
      prophetnet modified
      
      modify codes as suggested v1
      
      add prophetnet test files
      
      * still bugs, because of changed output formats of encoder and decoder
      
      * move prophetnet into the latest version
      
      * clean integration tests
      
      * clean tokenizers
      
      * add xlm config to init
      
      * correct typo in init
      
      * further refactoring
      
      * continue refactor
      
      * save parallel
      
      * add decoder_attention_mask
      
      * fix use_cache vs. past_key_values
      
      * fix common tests
      
      * change decoder output logits
      
      * fix xlm tests
      
      * make common tests pass
      
      * change model architecture
      
      * add tokenizer tests
      
      * finalize model structure
      
      * no weight mapping
      
      * correct n-gram stream attention mask as discussed with qweizhen
      
      * remove unused import
      
      * fix index.rst
      
      * fix tests
      
      * delete unnecessary code
      
      * add fast integration test
      
      * rename weights
      
      * final weight remapping
      
      * save intermediate
      
      * Descriptions for Prophetnet Config File
      
      * finish all models
      
      * finish new model outputs
      
      * delete unnecessary files
      
      * refactor encoder layer
      
      * add dummy docs
      
      * code quality
      
      * fix tests
      
      * add model pages to doctree
      
      * further refactor
      
      * more refactor, more tests
      
      * finish code refactor and tests
      
      * remove unnecessary files
      
      * further clean up
      
      * add docstring template
      
      * finish tokenizer doc
      
      * finish prophetnet
      
      * fix copies
      
      * fix typos
      
      * fix tf tests
      
      * fix fp16
      
      * fix tf test 2nd try
      
      * fix code quality
      
      * add test for each model
      
      * merge new tests to branch
      
      * Update model_cards/microsoft/prophetnet-large-uncased-cnndm/README.md
      Co-authored-by: default avatarSam Shleifer <sshleifer@gmail.com>
      
      * Update model_cards/microsoft/prophetnet-large-uncased-cnndm/README.md
      Co-authored-by: default avatarSam Shleifer <sshleifer@gmail.com>
      
      * Update src/transformers/modeling_prophetnet.py
      Co-authored-by: default avatarSam Shleifer <sshleifer@gmail.com>
      
      * Update utils/check_repo.py
      Co-authored-by: default avatarSam Shleifer <sshleifer@gmail.com>
      
      * apply sams and sylvains comments
      
      * make style
      
      * remove unnecessary code
      
      * Update README.md
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Update README.md
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Update src/transformers/configuration_prophetnet.py
      Co-authored-by: default avatarLysandre Debut <lysandre@huggingface.co>
      
      * implement lysandres comments
      
      * correct docs
      
      * fix isort
      
      * fix tokenizers
      
      * fix copies
      Co-authored-by: default avatarweizhen <weizhen@mail.ustc.edu.cn>
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      Co-authored-by: default avatarSam Shleifer <sshleifer@gmail.com>
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      Co-authored-by: default avatarLysandre Debut <lysandre@huggingface.co>
      2422cda0