python3Packages.transformers: 2.2.1 -> 3.0.1

Changelog:

https://github.com/huggingface/transformers/releases/tag/v3.0.0
https://github.com/huggingface/transformers/releases/tag/v3.0.1

authored by danieldk.tngl.sh and committed by Frederik Rietdijk 4855aa62 1bc8a6ee

+53 -13
+53 -13
pkgs/development/python-modules/transformers/default.nix
··· 1 { buildPythonPackage 2 , stdenv 3 , fetchFromGitHub 4 , sacremoses 5 - , requests 6 , sentencepiece 7 - , boto3 8 , tqdm 9 - , regex 10 - , numpy 11 - , pytest 12 }: 13 14 buildPythonPackage rec { 15 pname = "transformers"; 16 - version = "2.2.1"; 17 18 src = fetchFromGitHub { 19 owner = "huggingface"; 20 repo = pname; 21 rev = "v${version}"; 22 - sha256 = "1p8p3lhhiyk1xl9gpgq4vbchyz57v3w7hhvsj1r90zs3cckindl8"; 23 }; 24 25 - propagatedBuildInputs = [ numpy sacremoses requests sentencepiece boto3 tqdm regex ]; 26 27 - checkInputs = [ pytest ]; 28 - # pretrained tries to download from s3 29 - checkPhase = '' 30 - cd transformers # avoid importing local files 31 - HOME=$TMPDIR pytest -k 'not pretrained_tokenizers' 32 ''; 33 34 meta = with stdenv.lib; { 35 homepage = "https://github.com/huggingface/transformers";
··· 1 { buildPythonPackage 2 , stdenv 3 , fetchFromGitHub 4 + , boto3 5 + , filelock 6 + , regex 7 + , requests 8 + , numpy 9 , sacremoses 10 , sentencepiece 11 + , timeout-decorator 12 + , tokenizers 13 , tqdm 14 + , pytestCheckHook 15 }: 16 17 buildPythonPackage rec { 18 pname = "transformers"; 19 + version = "3.0.1"; 20 21 src = fetchFromGitHub { 22 owner = "huggingface"; 23 repo = pname; 24 rev = "v${version}"; 25 + sha256 = "1l8l82zi021sq5dnzlbjx3wx0n4yy7k96n3m2fr893y9lfkhhd8z"; 26 }; 27 28 + propagatedBuildInputs = [ 29 + boto3 30 + filelock 31 + numpy 32 + regex 33 + requests 34 + sacremoses 35 + sentencepiece 36 + tokenizers 37 + tqdm 38 + ]; 39 40 + checkInputs = [ 41 + pytestCheckHook 42 + timeout-decorator 43 + ]; 44 + 45 + postPatch = '' 46 + substituteInPlace setup.py \ 47 + --replace "tokenizers == 0.8.0-rc4" "tokenizers>=0.8,<0.9" 48 + ''; 49 + 50 + preCheck = '' 51 + export HOME="$TMPDIR" 52 + cd tests 53 ''; 54 + 55 + # Disable tests that require network access. 56 + disabledTests = [ 57 + "test_all_tokenizers" 58 + "test_batch_encoding_is_fast" 59 + "test_batch_encoding_pickle" 60 + "test_config_from_model_shortcut" 61 + "test_config_model_type_from_model_identifier" 62 + "test_from_pretrained_use_fast_toggle" 63 + "test_hf_api" 64 + "test_outputs_can_be_shorter" 65 + "test_outputs_not_longer_than_maxlen" 66 + "test_pretokenized_tokenizers" 67 + "test_tokenizer_equivalence_en_de" 68 + "test_tokenizer_from_model_type" 69 + "test_tokenizer_from_model_type" 70 + "test_tokenizer_from_pretrained" 71 + "test_tokenizer_identifier_with_correct_config" 72 + ]; 73 74 meta = with stdenv.lib; { 75 homepage = "https://github.com/huggingface/transformers";