Daniël de Kok 2020-11-14 10:38:19 +01:00
parent bff9a1a124
commit 76ca342572

View file

@ -18,13 +18,13 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "transformers"; pname = "transformers";
version = "3.4.0"; version = "3.5.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "huggingface"; owner = "huggingface";
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
sha256 = "1v09gryxsg57d2cjwagna1535m8mbxlazdbhsww210lxa818m5qj"; sha256 = "02z5zz0rq7mbgdmsm2ccfdbca57qy7iqp0vc7jspsmdfif4acwia";
}; };
propagatedBuildInputs = [ propagatedBuildInputs = [
@ -47,7 +47,8 @@ buildPythonPackage rec {
postPatch = '' postPatch = ''
substituteInPlace setup.py \ substituteInPlace setup.py \
--replace "tokenizers == 0.9.2" "tokenizers" --replace "tokenizers == 0.9.3" "tokenizers" \
--replace "sentencepiece == 0.1.91" "sentencepiece"
''; '';
preCheck = '' preCheck = ''
@ -70,11 +71,13 @@ buildPythonPackage rec {
disabledTests = [ disabledTests = [
"BlenderbotSmallTokenizerTest" "BlenderbotSmallTokenizerTest"
"Blenderbot3BTokenizerTests" "Blenderbot3BTokenizerTests"
"GetFromCacheTests"
"TokenizationTest" "TokenizationTest"
"TestTokenizationBart" "TestTokenizationBart"
"test_all_tokenizers" "test_all_tokenizers"
"test_batch_encoding_is_fast" "test_batch_encoding_is_fast"
"test_batch_encoding_pickle" "test_batch_encoding_pickle"
"test_batch_encoding_word_to_tokens"
"test_config_from_model_shortcut" "test_config_from_model_shortcut"
"test_config_model_type_from_model_identifier" "test_config_model_type_from_model_identifier"
"test_from_pretrained_use_fast_toggle" "test_from_pretrained_use_fast_toggle"
@ -89,6 +92,7 @@ buildPythonPackage rec {
"test_tokenizer_from_pretrained" "test_tokenizer_from_pretrained"
"test_tokenizer_from_tokenizer_class" "test_tokenizer_from_tokenizer_class"
"test_tokenizer_identifier_with_correct_config" "test_tokenizer_identifier_with_correct_config"
"test_tokenizer_identifier_non_existent"
]; ];
meta = with stdenv.lib; { meta = with stdenv.lib; {