1. 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
  2. 05 Dec, 2022 1 commit
  3. 06 Sep, 2022 1 commit
  4. 10 Aug, 2022 1 commit
  5. 10 Jun, 2022 2 commits
  6. 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
  7. 07 Apr, 2022 1 commit
  8. 23 Feb, 2022 1 commit
  9. 18 Feb, 2022 1 commit
  10. 21 Jan, 2022 1 commit
    • Sylvain Gugger's avatar
      Refine errors for pretrained objects (#15261) · 6ac77534
      Sylvain Gugger authored
      * Refine errors for pretrained objects
      
      * PoC to avoid using get_list_of_files
      
      * Adapt tests to use new errors
      
      * Quality + Fix PoC
      
      * Revert "PoC to avoid using get_list_of_files"
      
      This reverts commit cb93b7cae8504ef837c2a7663cb7955e714f323e.
      
      * Revert "Quality + Fix PoC"
      
      This reverts commit 3ba6d0d4ca546708b31d355baa9e68ba9736508f.
      
      * Fix doc
      
      * Revert PoC
      
      * Add feature extractors
      
      * More tests and PT model
      
      * Adapt error message
      
      * Feature extractor tests
      
      * TF model
      
      * Flax model and test
      
      * Merge flax auto tests
      
      * Add tokenization
      
      * Fix test
      6ac77534
  11. 30 Nov, 2021 1 commit
    • Kamal Raj's avatar
      Tapas tf (#13393) · c468a87a
      Kamal Raj authored
      * TF Tapas first commit
      
      * updated docs
      
      * updated logger message
      
      * updated pytorch weight conversion
      script to support scalar array
      
      * added use_cache to tapas model config to
      work properly with tf input_processing
      
      * 1. rm embeddings_sum
      2. added # Copied
      3. + TFTapasMLMHead
      4. and lot other small fixes
      
      * updated docs
      
      * + test for tapas
      
      * updated testing_utils to check
      is_tensorflow_probability_available
      
      * converted model logits post processing using
      numpy to work with both PT and TF models
      
      * + TFAutoModelForTableQuestionAnswering
      
      * added TF support
      
      * added test for
      TFAutoModelForTableQuestionAnswering
      
      * added test for
      TFAutoModelForTableQuestionAnswering pipeline
      
      * updated auto model docs
      
      * fixed typo in import
      
      * added tensorflow_probability to run tests
      
      * updated MLM head
      
      * updated tapas.rst with TF  model docs
      
      * fixed optimizer import in docs
      
      * updated convert to np
      data from pt model is not
      `transformers.tokenization_utils_base.BatchEncoding`
      after pipeline upgrade
      
      * updated pipeline:
      1. with torch.no_gard removed, pipeline forward handles
      2. token_type_ids converted to numpy
      
      * updated docs.
      
      * removed `use_cache` from config
      
      * removed floats_tensor
      
      * updated code comment
      
      * updated Copyright Year and
      logits_aggregation Optional
      
      * updated docs and comments
      
      * updated docstring
      
      * fixed model weight loading
      
      * make fixup
      
      * fix indentation
      
      * added tf slow pipeline test
      
      * pip upgrade
      
      * upgrade python to 3.7
      
      * removed from_pt from tests
      
      * revert commit f18cfa9
      c468a87a
  12. 18 Oct, 2021 1 commit
  13. 21 Sep, 2021 1 commit
  14. 08 Apr, 2021 1 commit
  15. 31 Mar, 2021 1 commit
  16. 08 Dec, 2020 1 commit
    • Julien Plu's avatar
      Optional layers (#8961) · bf7f79cd
      Julien Plu authored
      * Apply on BERT and ALBERT
      
      * Update TF Bart
      
      * Add input processing to TF BART
      
      * Add input processing for TF CTRL
      
      * Add input processing to TF Distilbert
      
      * Add input processing to TF DPR
      
      * Add input processing to TF Electra
      
      * Add deprecated arguments
      
      * Add input processing to TF XLM
      
      * remove unused imports
      
      * Add input processing to TF Funnel
      
      * Add input processing to TF GPT2
      
      * Add input processing to TF Longformer
      
      * Add input processing to TF Lxmert
      
      * Apply style
      
      * Add input processing to TF Mobilebert
      
      * Add input processing to TF GPT
      
      * Add input processing to TF Roberta
      
      * Add input processing to TF T5
      
      * Add input processing to TF TransfoXL
      
      * Apply style
      
      * Rebase on master
      
      * Fix wrong model name
      
      * Fix BART
      
      * Apply style
      
      * Put the deprecated warnings in the input processing function
      
      * Remove the unused imports
      
      * Raise an error when len(kwargs)>0
      
      * test ModelOutput instead of TFBaseModelOutput
      
      * Address Patrick's comments
      
      * Address Patrick's comments
      
      * Add boolean processing for the inputs
      
      * Take into account the optional layers
      
      * Add missing/unexpected weights in the other models
      
      * Apply style
      
      * rename parameters
      
      * Apply style
      
      * Remove useless
      
      * Remove useless
      
      * Remove useless
      
      * Update num parameters
      
      * Fix tests
      
      * Address Patrick's comment
      
      * Remove useless attribute
      bf7f79cd
  17. 07 Dec, 2020 1 commit
  18. 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
  19. 24 Aug, 2020 1 commit
  20. 07 Jul, 2020 1 commit
  21. 01 Jul, 2020 1 commit
  22. 25 Jun, 2020 1 commit
    • Thomas Wolf's avatar
      [Tokenization] Fix #5181 - make #5155 more explicit - move back the default... · 27cf1d97
      Thomas Wolf authored
      [Tokenization] Fix #5181 - make #5155 more explicit - move back the default logging level in tests to WARNING (#5252)
      
      * fix-5181
      
      Padding to max sequence length while truncation to another length was wrong on slow tokenizers
      
      * clean up and fix #5155
      
      * fix XLM test
      
      * Fix tests for Transfo-XL
      
      * logging only above WARNING in tests
      
      * switch slow tokenizers tests in @slow
      
      * fix Marian truncation tokenization test
      
      * style and quality
      
      * make the test a lot faster by limiting the sequence length used in tests
      27cf1d97
  23. 02 Jun, 2020 1 commit
    • Julien Chaumond's avatar
      Kill model archive maps (#4636) · d4c2cb40
      Julien Chaumond authored
      * Kill model archive maps
      
      * Fixup
      
      * Also kill model_archive_map for MaskedBertPreTrainedModel
      
      * Unhook config_archive_map
      
      * Tokenizers: align with model id changes
      
      * make style && make quality
      
      * Fix CI
      d4c2cb40
  24. 27 Jan, 2020 1 commit
  25. 11 Jan, 2020 1 commit
  26. 10 Jan, 2020 1 commit
  27. 06 Jan, 2020 2 commits
  28. 22 Dec, 2019 7 commits
  29. 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
  30. 11 Dec, 2019 1 commit
    • Julien Chaumond's avatar
      Add tests. · 4f15e5a2
      Julien Chaumond authored
      Maybe not the best possible place for the tests, lmk.
      4f15e5a2
  31. 06 Dec, 2019 1 commit
    • Aymeric Augustin's avatar
      Remove dependency on pytest for running tests (#2055) · 35401fe5
      Aymeric Augustin authored
      * Switch to plain unittest for skipping slow tests.
      
      Add a RUN_SLOW environment variable for running them.
      
      * Switch to plain unittest for PyTorch dependency.
      
      * Switch to plain unittest for TensorFlow dependency.
      
      * Avoid leaking open files in the test suite.
      
      This prevents spurious warnings when running tests.
      
      * Fix unicode warning on Python 2 when running tests.
      
      The warning was:
      
          UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
      
      * Support running PyTorch tests on a GPU.
      
      Reverts 27e015bd.
      
      * Tests no longer require pytest.
      
      * Make tests pass on cuda
      35401fe5