Merge pull request #305406 from GaetanLepage/transformers

python311Packages.transformers: 4.39.3 -> 4.40.0
This commit is contained in:
Yt 2024-04-19 23:23:27 +00:00 committed by GitHub
commit c6d6ab9c08
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 251 additions and 346 deletions

File diff suppressed because it is too large Load Diff

View File

@ -63,16 +63,16 @@ let
in in
buildPythonPackage rec { buildPythonPackage rec {
pname = "tokenizers"; pname = "tokenizers";
version = "0.15.0"; version = "0.19.1";
format = "pyproject"; pyproject = true;
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.7";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "huggingface"; owner = "huggingface";
repo = pname; repo = "tokenizers";
rev = "v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-+yfX12eKtgZV1OQvPOlMVTONbpFuigHcl4SjoCIZkSk="; hash = "sha256-sKEAt46cdme821tzz9WSKnQb3hPmFJ4zvHgBNRxjEuk=";
}; };
cargoDeps = rustPlatform.importCargoLock { cargoDeps = rustPlatform.importCargoLock {
@ -97,7 +97,13 @@ buildPythonPackage rec {
Security Security
]; ];
propagatedBuildInputs = [ # Cargo.lock is outdated
# TODO: remove at next release
preConfigure = ''
cargo update --offline
'';
dependencies = [
numpy numpy
]; ];
@ -123,6 +129,8 @@ buildPythonPackage rec {
disabledTests = [ disabledTests = [
# Downloads data using the datasets module # Downloads data using the datasets module
"test_encode_special_tokens"
"test_splitting"
"TestTrainFromIterators" "TestTrainFromIterators"
# Those tests require more data # Those tests require more data
"test_from_pretrained" "test_from_pretrained"

View File

@ -2,6 +2,7 @@
, buildPythonPackage , buildPythonPackage
, fetchFromGitHub , fetchFromGitHub
, pythonOlder , pythonOlder
, setuptools
# propagated build inputs # propagated build inputs
, filelock , filelock
, huggingface-hub , huggingface-hub
@ -53,8 +54,8 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "transformers"; pname = "transformers";
version = "4.39.3"; version = "4.40.0";
format = "setuptools"; pyproject = true;
disabled = pythonOlder "3.8"; disabled = pythonOlder "3.8";
@ -62,9 +63,13 @@ buildPythonPackage rec {
owner = "huggingface"; owner = "huggingface";
repo = "transformers"; repo = "transformers";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-MJZvPbj9ypr6YwFGkzwCp9fVuM3vEGpeXK+gEIFzwRA="; hash = "sha256-k0AloOG7fRQhTW8IF6uQSfav8p1KC5633SaLNYZrZ2M=";
}; };
build-system = [
setuptools
];
propagatedBuildInputs = [ propagatedBuildInputs = [
filelock filelock
huggingface-hub huggingface-hub