From fccf069e7735b03f002150f1a9655a8831a90465 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Tue, 22 Sep 2020 18:56:04 +0200 Subject: [PATCH] python3Packages.transformers: 3.1.0 -> 3.2.0 Changes: https://github.com/huggingface/transformers/releases/tag/v3.2.0 --- .../python-modules/transformers/default.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/transformers/default.nix b/pkgs/development/python-modules/transformers/default.nix index aa6db6a7353387..328cfb0ba8bb7d 100644 --- a/pkgs/development/python-modules/transformers/default.nix +++ b/pkgs/development/python-modules/transformers/default.nix @@ -6,6 +6,7 @@ , regex , requests , numpy +, parameterized , sacremoses , sentencepiece , timeout-decorator @@ -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 = [ @@ -38,6 +39,7 @@ buildPythonPackage rec { ]; checkInputs = [ + parameterized pytestCheckHook timeout-decorator ]; @@ -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" @@ -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" ];