1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 13:41:26 +00:00

python3Packages.transformers: 3.1.0 -> 3.2.0

Changes:
https://github.com/huggingface/transformers/releases/tag/v3.2.0
This commit is contained in:
Daniël de Kok 2020-09-22 18:56:04 +02:00 committed by Jon
parent 36ad05e8d2
commit fccf069e77

View file

@ -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"
];