1. 10 Aug, 2020 1 commit
  2. 01 Jul, 2020 1 commit
  3. 06 Jan, 2020 2 commits
  4. 22 Dec, 2019 8 commits
  5. 21 Dec, 2019 1 commit
    • 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
  6. 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
  7. 14 Nov, 2019 1 commit
    • R茅mi Louf's avatar
      replace LambdaLR scheduler wrappers by function · 022525b0
      R茅mi Louf authored
      Custom schedulers are currently initiated by wrapping Pytorch's LambdaLR
      class and passing a method of the wrapping class to the __init__
      function of LambdaLR. This approach is not appropriate for several
      reasons:
      
      1. one does not need to define a class when it only defines a
      __init__() method;
      2. instantiating the parent class by passing a method of the child class
      creates a cyclical reference which leads to memory leaks. See issues #1742 and #1134.
      
      In this commit we replace the wrapper classes with functions that
      instantiate `LambdaLR` with a custom learning rate function. We use a
      closure to specify the parameter of the latter. We also do a bit of
      renaming within the function to explicit the behaviour and removed
      docstrings that were subsequently not necessary.
      022525b0
  8. 26 Sep, 2019 1 commit
  9. 09 Sep, 2019 1 commit
  10. 08 Sep, 2019 1 commit
  11. 05 Sep, 2019 1 commit
  12. 23 Jul, 2019 1 commit
  13. 11 Jul, 2019 2 commits
  14. 05 Jul, 2019 1 commit
  15. 02 Jul, 2019 1 commit
  16. 25 Apr, 2019 2 commits
  17. 21 Apr, 2019 1 commit
  18. 03 Apr, 2019 6 commits
  19. 18 Mar, 2019 1 commit
  20. 13 Dec, 2018 3 commits
  21. 12 Dec, 2018 1 commit
  22. 09 Dec, 2018 1 commit
  23. 17 Nov, 2018 1 commit