1. 13 Jun, 2023 1 commit
  2. 24 May, 2023 1 commit
    • Matt's avatar
      Better TF docstring types (#23477) · f8b25744
      Matt authored
      * Rework TF type hints to use | None instead of Optional[] for tf.Tensor
      
      * Rework TF type hints to use | None instead of Optional[] for tf.Tensor
      
      * Don't forget the imports
      
      * Add the imports to tests too
      
      * make fixup
      
      * Refactor tests that depended on get_type_hints
      
      * Better test refactor
      
      * Fix an old hidden bug in the test_keras_fit input creation code
      
      * Fix for the Deit tests
      f8b25744
  3. 28 Feb, 2023 1 commit
    • Yih-Dar's avatar
      🔥Rework pipeline testing by removing `PipelineTestCaseMeta` 🚀 (#21516) · 871c31a6
      Yih-Dar authored
      
      
      * Add PipelineTesterMixin
      
      * remove class PipelineTestCaseMeta
      
      * move validate_test_components
      
      * Add for ViT
      
      * Add to SPECIAL_MODULE_TO_TEST_MAP
      
      * style and quality
      
      * Add feature-extraction
      
      * update
      
      * raise instead of skip
      
      * add tiny_model_summary.json
      
      * more explicit
      
      * skip tasks not in mapping
      
      * add availability check
      
      * Add Copyright
      
      * A way to diable irrelevant tests
      
      * update with main
      
      * remove disable_irrelevant_tests
      
      * skip tests
      
      * better skip message
      
      * better skip message
      
      * Add all pipeline task tests
      
      * revert
      
      * Import PipelineTesterMixin
      
      * subclass test classes with PipelineTesterMixin
      
      * Add pipieline_model_mapping
      
      * Fix import after adding pipieline_model_mapping
      
      * Fix style and quality after adding pipieline_model_mapping
      
      * Fix one more import after adding pipieline_model_mapping
      
      * Fix style and quality after adding pipieline_model_mapping
      
      * Fix test issues
      
      * Fix import requirements
      
      * Fix mapping for MobileViTModelTest
      
      * Update
      
      * Better skip message
      
      * pipieline_model_mapping could not be None
      
      * Remove some PipelineTesterMixin
      
      * Fix typo
      
      * revert tests_fetcher.py
      
      * update
      
      * rename
      
      * revert
      
      * Remove PipelineTestCaseMeta from ZeroShotAudioClassificationPipelineTests
      
      * style and quality
      
      * test fetcher for all pipeline/model tests
      
      ---------
      Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
      871c31a6
  4. 09 Feb, 2023 1 commit
  5. 06 Feb, 2023 1 commit
    • Sylvain Gugger's avatar
      Update quality tooling for formatting (#21480) · 6f79d264
      Sylvain Gugger authored
      * Result of black 23.1
      
      * Update target to Python 3.7
      
      * Switch flake8 to ruff
      
      * Configure isort
      
      * Configure isort
      
      * Apply isort with line limit
      
      * Put the right black version
      
      * adapt black in check copies
      
      * Fix copies
      6f79d264
  6. 09 Sep, 2022 1 commit
    • Matt's avatar
      Fix train_step, test_step and tests for CLIP (#18684) · 660e0b97
      Matt authored
      
      
      * Fix train_step and test_step, correctly enable CLIP fit test
      
      * Stop using get_args on older Python versions
      
      * Don't use get_origin either
      
      * UnionType is actually even newer, don't use that either
      
      * Apply the same fix to test_loss_computation
      
      * Just realized I was accidentally skipping a bunch of tests!
      
      * Fix test_loss_computation for models without separable labels
      
      * Fix scalar losses in test_step and train_step
      
      * Stop committing your breakpoints
      
      * Fix Swin loss shape
      
      * Fix Tapas loss shape
      
      * Shape fixes for TAPAS, DeIT, HuBERT and ViTMAE
      
      * Add loss computation to TFMobileBertForPreTraining
      
      * make fixup and move copied from statement
      
      * make fixup and move copied from statement
      
      * Correct copied from
      
      * Add labels and next_sentence_label inputs to TFMobileBERT
      
      * Make sure total_loss is always defined
      
      * Update tests/test_modeling_tf_common.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Fix copied from
      
      * Ensure CTC models get labels in tests
      
      * Ensure CTC models get labels in tests
      
      * Fix tests for vit_mae
      
      * Fix tests for vit_mae
      
      * Fix tests for vit_mae
      
      * Reduce batch size for wav2vec2 testing because it was causing OOM
      
      * Skip some TAPAS tests that are failing
      
      * Skip a failing HuBERT test
      
      * make style
      
      * Fix mobilebertforpretraining test
      
      * Skip Wav2Vec2 tests that use huge amounts of mem
      
      * Skip keras_fit for Wav2Vec2 as well
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      660e0b97
  7. 22 Jul, 2022 1 commit
    • amyeroberts's avatar
      Update serving code to enable `saved_model=True` (#18153) · 8e838466
      amyeroberts authored
      
      
      * Add serving_output and serving methods to some vision models
      
      * Add serving outputs for DeiT
      
      * Don't convert hidden states - differing shapes
      
      * Make saveable
      
      * Fix up
      
      * Make swin saveable
      
      * Add in tests
      
      * Fix funnel tests (can't convert to tensor)
      
      * Fix numpy call
      
      * Tidy up a bit
      
      * Add in hidden states - resnet
      
      * Remove numpy
      
      * Fix failing tests - tensor shape and skipping tests
      
      * Remove duplicated function
      
      * PR comments - formatting and var names
      
      * PR comments
      Add suggestions made by Joao Gante:
      * Use tf.shape instead of shape_list
      * Use @tooslow decorator on tests
      * Simplify some of the logic
      
      * PR comments
      Address Yih-Dar Sheih comments - making tensor names consistent and make types float
      
      * Types consistent with docs; disable test on swin (slow)
      
      * CI trigger
      
      * Change input_features to float32
      
      * Add serving_output for segformer
      
      * Fixup
      Co-authored-by: default avatarAmy Roberts <amyeroberts@users.noreply.github.com>
      8e838466
  8. 03 May, 2022 1 commit
    • Yih-Dar's avatar
      Move test model folders (#17034) · 19420fd9
      Yih-Dar authored
      
      
      * move test model folders (TODO: fix imports and others)
      
      * fix (potentially partially) imports (in model test modules)
      
      * fix (potentially partially) imports (in tokenization test modules)
      
      * fix (potentially partially) imports (in feature extraction test modules)
      
      * fix import utils.test_modeling_tf_core
      
      * fix path ../fixtures/
      
      * fix imports about generation.test_generation_flax_utils
      
      * fix more imports
      
      * fix fixture path
      
      * fix get_test_dir
      
      * update module_to_test_file
      
      * fix get_tests_dir from wrong transformers.utils
      
      * update config.yml (CircleCI)
      
      * fix style
      
      * remove missing imports
      
      * update new model script
      
      * update check_repo
      
      * update SPECIAL_MODULE_TO_TEST_MAP
      
      * fix style
      
      * add __init__
      
      * update self-scheduled
      
      * fix add_new_model scripts
      
      * check one way to get location back
      
      * python setup.py build install
      
      * fix import in test auto
      
      * update self-scheduled.yml
      
      * update slack notification script
      
      * Add comments about artifact names
      
      * fix for yolos
      Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
      19420fd9
  9. 01 Apr, 2022 1 commit
  10. 23 Feb, 2022 1 commit
  11. 19 Feb, 2021 1 commit
  12. 15 Feb, 2021 1 commit
    • Julien Plu's avatar
      Check TF ops for ONNX compliance (#10025) · c8d3fa0d
      Julien Plu authored
      
      
      * Add check-ops script
      
      * Finish to implement check_tf_ops and start the test
      
      * Make the test mandatory only for BERT
      
      * Update tf_ops folder
      
      * Remove useless classes
      
      * Add the ONNX test for GPT2 and BART
      
      * Add a onnxruntime slow test + better opset flexibility
      
      * Fix test + apply style
      
      * fix tests
      
      * Switch min opset from 12 to 10
      
      * Update src/transformers/file_utils.py
      Co-authored-by: default avatarLysandre Debut <lysandre@huggingface.co>
      
      * Fix GPT2
      
      * Remove extra shape_list usage
      
      * Fix GPT2
      
      * Address Morgan's comments
      Co-authored-by: default avatarLysandre Debut <lysandre@huggingface.co>
      c8d3fa0d
  13. 03 Feb, 2021 1 commit
  14. 27 Jan, 2021 1 commit
  15. 26 Jan, 2021 1 commit
    • Daniel Stancl's avatar
      Add head_mask/decoder_head_mask for TF BART models (#9639) · 1867d9a8
      Daniel Stancl authored
      * Add head_mask/decoder_head_mask for TF BART models
      
      * Add head_mask and decoder_head_mask input arguments for TF BART-based
      models as a TF counterpart to the PR #9569
      
      * Add test_headmasking functionality to tests/test_modeling_tf_common.py
      
      * TODO: Add a test to verify that we can get a gradient back for
      importance score computation
      
      * Remove redundant #TODO note
      
      Remove redundant #TODO note from tests/test_modeling_tf_common.py
      
      * Fix assertions
      
      * Make style
      
      * Fix ...Model input args and adjust one new test
      
      * Add back head_mask and decoder_head_mask to BART-based ...Model
      after the last commit
      
      * Remove head_mask ande decoder_head_mask from input_dict
      in TF test_train_pipeline_custom_model as these two have different
      shape than other input args (Necessary for passing this test)
      
      * Revert adding global_rng in test_modeling_tf_common.py
      1867d9a8
  16. 11 Jan, 2021 1 commit
    • Julien Plu's avatar
      Full rework of the TF input/output embeddings and bias resizing (#9193) · 1243ee7d
      Julien Plu authored
      * Start rework resizing
      
      * Rework bias/decoder resizing
      
      * Full resizing rework
      
      * Full resizing rework
      
      * Start to update the models with the new approach
      
      * Finish to update the models
      
      * Update all the tests
      
      * Update the template
      
      * Fix tests
      
      * Fix tests
      
      * Test a new approach
      
      * Refactoring
      
      * Refactoring
      
      * Refactoring
      
      * New rework
      
      * Rework BART
      
      * Rework bert+blenderbot
      
      * Rework CTRL
      
      * Rework Distilbert
      
      * Rework DPR
      
      * Rework Electra
      
      * Rework Flaubert
      
      * Rework Funnel
      
      * Rework GPT2
      
      * Rework Longformer
      
      * Rework Lxmert
      
      * Rework marian+mbart
      
      * Rework mobilebert
      
      * Rework mpnet
      
      * Rework openai
      
      * Rework pegasus
      
      * Rework Roberta
      
      * Rework T5
      
      * Rework xlm+xlnet
      
      * Rework template
      
      * Fix TFT5EncoderOnly + DPRs
      
      * Restore previous methods
      
      * Fix Funnel
      
      * Fix CTRL and TransforXL
      
      * Apply style
      
      * Apply Sylvain's comments
      
      * Restore a test in DPR
      
      * Address the comments
      
      * Fix bug
      
      * Apply style
      
      * remove unused import
      
      * Fix test
      
      * Forgot a method
      
      * missing test
      
      * Trigger CI
      
      * naming update
      
      * Rebase
      
      * Trigger CI
      1243ee7d
  17. 07 Jan, 2021 1 commit
    • Julien Plu's avatar
      New serving (#9419) · 812045ad
      Julien Plu authored
      * Add a serving method
      
      * Add albert
      
      * Add serving for BERT and BART
      
      * Add more models
      
      * Finish the serving addition
      
      * Temp fix
      
      * Restore DPR
      
      * Fix funnel attribute
      
      * Fix attributes GPT2
      
      * Fix OpenAIGPT attribute
      
      * Fix T5 attributes
      
      * Fix Bart attributes
      
      * Fix TransfoXL attributes
      
      * Add versioning
      
      * better test
      
      * Update template
      
      * Fix Flaubert
      
      * Fix T5
      
      * Apply style
      
      * Remove unused imports
      
      * Deactivate extra parameters
      
      * Remove too long test + saved_model default to False
      
      * Ignore the saved model test for some models
      
      * Fix some inputs
      
      * Fix mpnet serving
      
      * Trigger CI
      
      * Address all comments
      812045ad
  18. 14 Dec, 2020 1 commit
    • Julien Plu's avatar
      Fix embeddings resizing in TF models (#8657) · 51d9c569
      Julien Plu authored
      * Resize the biases in same time than the embeddings
      
      * Trigger CI
      
      * Biases are not reset anymore
      
      * Remove get_output_embeddings + better LM model detection in generation utils
      
      * Apply style
      
      * First test on BERT
      
      * Update docstring + new name
      
      * Apply the new resizing logic to all the models
      
      * fix tests
      
      * Apply style
      
      * Update the template
      
      * Fix naming
      
      * Fix naming
      
      * Apply style
      
      * Apply style
      
      * Remove unused import
      
      * Revert get_output_embeddings
      
      * Trigger CI
      
      * Update num parameters
      
      * Restore get_output_embeddings in TFPretrainedModel and add comments
      
      * Style
      
      * Add decoder resizing
      
      * Style
      
      * Fix tests
      
      * Separate bias and decoder resize
      
      * Fix tests
      
      * Fix tests
      
      * Apply style
      
      * Add bias resizing in MPNet
      
      * Trigger CI
      
      * Apply style
      51d9c569
  19. 07 Dec, 2020 1 commit
  20. 17 Nov, 2020 1 commit
    • Sylvain Gugger's avatar
      Reorganize repo (#8580) · c89bdfbe
      Sylvain Gugger authored
      * Put models in subfolders
      
      * Styling
      
      * Fix imports in tests
      
      * More fixes in test imports
      
      * Sneaky hidden imports
      
      * Fix imports in doc files
      
      * More sneaky imports
      
      * Finish fixing tests
      
      * Fix examples
      
      * Fix path for copies
      
      * More fixes for examples
      
      * Fix dummy files
      
      * More fixes for example
      
      * More model import fixes
      
      * Is this why you're unhappy GitHub?
      
      * Fix imports in conver command
      c89bdfbe
  21. 16 Nov, 2020 1 commit
    • Sylvain Gugger's avatar
      Switch `return_dict` to `True` by default. (#8530) · 1073a2bd
      Sylvain Gugger authored
      * Use the CI to identify failing tests
      
      * Remove from all examples and tests
      
      * More default switch
      
      * Fixes
      
      * More test fixes
      
      * More fixes
      
      * Last fixes hopefully
      
      * Use the CI to identify failing tests
      
      * Remove from all examples and tests
      
      * More default switch
      
      * Fixes
      
      * More test fixes
      
      * More fixes
      
      * Last fixes hopefully
      
      * Run on the real suite
      
      * Fix slow tests
      1073a2bd
  22. 30 Oct, 2020 1 commit
    • Lysandre Debut's avatar
      Ci test tf super slow (#8007) · 10f8c636
      Lysandre Debut authored
      * Test TF GPU CI
      
      * Change cache
      
      * Fix missing torch requirement
      
      * Fix some model tests
      
      
      Style
      
      * LXMERT
      
      * MobileBERT
      
      * Longformer skip test
      
      * XLNet
      
      * The rest of the tests
      
      * RAG goes OOM in multi gpu setup
      
      * YAML test files
      
      * Last fixes
      
      * Skip doctests
      
      * Fill mask tests
      
      * Yaml files
      
      * Last test fix
      
      * Style
      
      * Update cache
      
      * Change ONNX tests to slow + use tiny model
      10f8c636
  23. 24 Aug, 2020 1 commit
  24. 13 Aug, 2020 1 commit
    • Stas Bekman's avatar
      cleanup tf unittests: part 2 (#6260) · e983da0e
      Stas Bekman authored
      * cleanup torch unittests: part 2
      
      * remove trailing comma added by isort, and which breaks flake
      
      * one more comma
      
      * revert odd balls
      
      * part 3: odd cases
      
      * more ["key"] -> .key refactoring
      
      * .numpy() is not needed
      
      * more unncessary .numpy() removed
      
      * more simplification
      e983da0e
  25. 05 Aug, 2020 1 commit
    • Sylvain Gugger's avatar
      Tf model outputs (#6247) · c67d1a02
      Sylvain Gugger authored
      * TF outputs and test on BERT
      
      * Albert to DistilBert
      
      * All remaining TF models except T5
      
      * Documentation
      
      * One file forgotten
      
      * TF outputs and test on BERT
      
      * Albert to DistilBert
      
      * All remaining TF models except T5
      
      * Documentation
      
      * One file forgotten
      
      * Add new models and fix issues
      
      * Quality improvements
      
      * Add T5
      
      * A bit of cleanup
      
      * Fix for slow tests
      
      * Style
      c67d1a02
  26. 01 Jul, 2020 1 commit
  27. 19 Jun, 2020 1 commit
    • Vasily Shamporov's avatar
      Add MobileBert (#4901) · 9a3f9108
      Vasily Shamporov authored
      
      
      * Add MobileBert
      
      * Quality + Conversion script
      
      * style
      
      * Update src/transformers/modeling_mobilebert.py
      
      * Links to S3
      
      * Style
      
      * TFMobileBert
      
      Slight fixes to the pytorch MobileBert
      Style
      
      * MobileBertForMaskedLM (PT + TF)
      
      * MobileBertForNextSentencePrediction (PT + TF)
      
      * MobileFor{MultipleChoice, TokenClassification} (PT + TF)
      
      
      ss
      
      * Tests + Auto
      
      * Doc
      
      * Tests
      
      * Addressing @sgugger's comments
      
      * Adressing @patrickvonplaten's comments
      
      * Style
      
      * Style
      
      * Integration test
      
      * style
      
      * Model card
      Co-authored-by: default avatarLysandre <lysandre.debut@reseau.eseo.fr>
      Co-authored-by: default avatarLysandre Debut <lysandre@huggingface.co>
      9a3f9108
  28. 06 Jan, 2020 2 commits
  29. 22 Dec, 2019 8 commits
  30. 21 Dec, 2019 2 commits
    • Aymeric Augustin's avatar
      Reformat source code with black. · fa84ae26
      Aymeric Augustin authored
      This is the result of:
      
          $ black --line-length 119 examples templates transformers utils hubconf.py setup.py
      
      There's a lot of fairly long lines in the project. As a consequence, I'm
      picking the longest widely accepted line length, 119 characters.
      
      This is also Thomas' preference, because it allows for explicit variable
      names, to make the code easier to understand.
      fa84ae26
    • Aymeric Augustin's avatar
      Take advantage of the cache when running tests. · b670c266
      Aymeric Augustin authored
      Caching models across test cases and across runs of the test suite makes
      slow tests somewhat more bearable.
      
      Use gettempdir() instead of /tmp in tests. This makes it easier to
      change the location of the cache with semi-standard TMPDIR/TEMP/TMP
      environment variables.
      
      Fix #2222.
      b670c266
  31. 13 Dec, 2019 1 commit