Skip to content

Commit

Permalink
python3Packages.transformers: 3.1.0 -> 3.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldk authored and Jon committed Sep 23, 2020
1 parent 36ad05e commit fccf069
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions pkgs/development/python-modules/transformers/default.nix
Expand Up @@ -6,6 +6,7 @@
, regex
, requests
, numpy
, parameterized
, sacremoses
, sentencepiece
, timeout-decorator
Expand All @@ -16,13 +17,13 @@

buildPythonPackage rec {
pname = "transformers";
version = "3.1.0";
version = "3.2.0";

src = fetchFromGitHub {
owner = "huggingface";
repo = pname;
rev = "v${version}";
sha256 = "0wg36qrcljmpsyhjaxpqw3s1r6276yg8cq0bjrf52l4zlc5k4xzk";
sha256 = "0jj94153kgdyklra30xcszxv11hwzfigzy82fgvgzvbwlxv3a1j5";
};

propagatedBuildInputs = [
Expand All @@ -38,6 +39,7 @@ buildPythonPackage rec {
];

checkInputs = [
parameterized
pytestCheckHook
timeout-decorator
];
Expand All @@ -49,14 +51,17 @@ buildPythonPackage rec {

preCheck = ''
export HOME="$TMPDIR"
cd tests
# This test requires the nlp module, which we haven't
# packaged yet. However, nlp is optional for transformers
# itself
rm test_trainer.py
rm tests/test_trainer.py
'';

# We have to run from the main directory for the tests. However,
# letting pytest discover tests leads to errors.
pytestFlagsArray = [ "tests" ];

# Disable tests that require network access.
disabledTests = [
"PegasusTokenizationTest"
Expand All @@ -76,6 +81,7 @@ buildPythonPackage rec {
"test_tokenizer_from_model_type"
"test_tokenizer_from_model_type"
"test_tokenizer_from_pretrained"
"test_tokenizer_from_tokenizer_class"
"test_tokenizer_identifier_with_correct_config"
];

Expand Down

0 comments on commit fccf069

Please sign in to comment.