python312Packages.transformers: 4.45.1 -> 4.45.2 (#347157)

This commit is contained in:
Peder Bergebakken Sundt 2024-10-08 09:02:36 +02:00 committed by GitHub
commit 81436de53c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 23 additions and 16 deletions

View File

@ -1,5 +1,6 @@
{ {
lib, lib,
stdenv,
buildPythonPackage, buildPythonPackage,
fetchPypi, fetchPypi,
pytestCheckHook, pytestCheckHook,
@ -54,10 +55,12 @@ buildPythonPackage rec {
"argostranslate.translate" "argostranslate.translate"
]; ];
meta = with lib; { meta = {
description = "Open-source offline translation library written in Python"; description = "Open-source offline translation library written in Python";
homepage = "https://www.argosopentech.com"; homepage = "https://www.argosopentech.com";
license = licenses.mit; license = lib.licenses.mit;
maintainers = with maintainers; [ misuzu ]; maintainers = with lib.maintainers; [ misuzu ];
# Segfaults at import
broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64;
}; };
} }

View File

@ -58,14 +58,14 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "transformers"; pname = "transformers";
version = "4.45.1"; version = "4.45.2";
pyproject = true; pyproject = true;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "huggingface"; owner = "huggingface";
repo = "transformers"; repo = "transformers";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-5fGEnw4YllQdZV/0vDGXYsCyTw0rtPRD/V7UWoBBZjQ="; hash = "sha256-5Ric+pEbBf6HswsPb8cdVLdqTRgicFjzcrk0oO2PtC0=";
}; };
build-system = [ setuptools ]; build-system = [ setuptools ];

View File

@ -2,18 +2,23 @@
lib, lib,
stdenv, stdenv,
buildPythonPackage, buildPythonPackage,
fetchFromGitHub,
# build-system
setuptools,
# dependencies
braceexpand, braceexpand,
numpy,
pyyaml,
# tests
imageio, imageio,
lmdb, lmdb,
msgpack, msgpack,
numpy,
pytestCheckHook, pytestCheckHook,
pyyaml,
setuptools,
torch, torch,
torchvision, torchvision,
wheel,
fetchFromGitHub,
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "webdataset"; pname = "webdataset";
@ -29,7 +34,6 @@ buildPythonPackage rec {
build-system = [ build-system = [
setuptools setuptools
wheel
]; ];
dependencies = [ dependencies = [
@ -39,12 +43,12 @@ buildPythonPackage rec {
]; ];
nativeCheckInputs = [ nativeCheckInputs = [
pytestCheckHook
imageio imageio
lmdb
msgpack
pytestCheckHook
torch torch
torchvision torchvision
msgpack
lmdb
]; ];
pythonImportsCheck = [ "webdataset" ]; pythonImportsCheck = [ "webdataset" ];
@ -86,10 +90,10 @@ buildPythonPackage rec {
disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [
# AttributeError: <module 'torch.distributed' from /nix/store/... # AttributeError: <module 'torch.distributed' from /nix/store/...
"tests/test_wids.py" "tests/wids/test_wids.py"
# Issue with creating a temp file in the sandbox # Issue with creating a temp file in the sandbox
"tests/test_wids_mmtar.py" "tests/wids/test_wids_mmtar.py"
]; ];
meta = { meta = {