1. 22 Dec, 2019 2 commits
    • Aymeric Augustin's avatar
      Move source code inside a src subdirectory. · 6be7cdda
      Aymeric Augustin authored
      This prevents transformers from being importable simply because the CWD
      is the root of the git repository, while not being importable from other
      directories. That led to inconsistent behavior, especially in examples.
      
      Once you fetch this commit, in your dev environment, you must run:
      
          $ pip uninstall transformers
          $ pip install -e .
      6be7cdda
    • Aymeric Augustin's avatar
      Sort imports with isort. · 158e82e0
      Aymeric Augustin authored
      This is the result of:
      
          $ isort --recursive examples templates transformers utils hubconf.py setup.py
      158e82e0
  2. 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
      Prevent parallel downloads of the same file with a lock. · a4c9338b
      Aymeric Augustin authored
      Since the file is written to the filesystem, a filesystem lock is the
      way to go here. Add a dependency on the third-party filelock library to
      get cross-platform functionality.
      a4c9338b
  3. 20 Dec, 2019 2 commits
  4. 19 Dec, 2019 1 commit
  5. 17 Dec, 2019 2 commits
  6. 13 Dec, 2019 1 commit
  7. 10 Dec, 2019 1 commit
  8. 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
  9. 04 Dec, 2019 1 commit
  10. 03 Dec, 2019 1 commit
  11. 26 Nov, 2019 1 commit
  12. 11 Oct, 2019 1 commit
  13. 09 Oct, 2019 1 commit
  14. 26 Sep, 2019 3 commits
  15. 08 Sep, 2019 1 commit
  16. 05 Sep, 2019 1 commit
  17. 04 Sep, 2019 1 commit
  18. 28 Aug, 2019 1 commit
  19. 24 Aug, 2019 1 commit
  20. 23 Aug, 2019 1 commit
  21. 15 Aug, 2019 1 commit
  22. 05 Aug, 2019 1 commit
  23. 16 Jul, 2019 2 commits
  24. 05 Jul, 2019 2 commits
  25. 21 Jun, 2019 1 commit
  26. 25 Apr, 2019 1 commit
  27. 18 Feb, 2019 1 commit
  28. 17 Feb, 2019 1 commit
  29. 13 Feb, 2019 1 commit
  30. 05 Feb, 2019 1 commit
  31. 08 Jan, 2019 1 commit
  32. 19 Dec, 2018 1 commit