about summary refs log tree commit diff
path: root/pkgs/development/python-modules/accelerate/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/accelerate/default.nix')
-rw-r--r--pkgs/development/python-modules/accelerate/default.nix24
1 files changed, 18 insertions, 6 deletions
diff --git a/pkgs/development/python-modules/accelerate/default.nix b/pkgs/development/python-modules/accelerate/default.nix
index d3bfb9cf1b0c1..b32cadab4b2de 100644
--- a/pkgs/development/python-modules/accelerate/default.nix
+++ b/pkgs/development/python-modules/accelerate/default.nix
@@ -4,6 +4,7 @@
 , fetchFromGitHub
 , pythonAtLeast
 , pythonOlder
+, llvmPackages
 , pytest7CheckHook
 , setuptools
 , numpy
@@ -21,21 +22,25 @@
 
 buildPythonPackage rec {
   pname = "accelerate";
-  version = "0.29.3";
+  version = "0.30.0";
   pyproject = true;
 
-  disabled = pythonOlder "3.7";
+  disabled = pythonOlder "3.8";
 
   src = fetchFromGitHub {
     owner = "huggingface";
-    repo = pname;
+    repo = "accelerate";
     rev = "refs/tags/v${version}";
-    hash = "sha256-oQGb/hlMN8JfwEyWufBvMk2Z1FMSl1lsdIbgZ3ZMdF8=";
+    hash = "sha256-E20pI5BrcTrMYrhriuOUl5/liSaQQy6eqRyCoauwb9Q=";
   };
 
-  nativeBuildInputs = [ setuptools ];
+  buildInputs = [
+    llvmPackages.openmp
+  ];
+
+  build-system = [ setuptools ];
 
-  propagatedBuildInputs = [
+  dependencies = [
     numpy
     packaging
     psutil
@@ -72,6 +77,9 @@ buildPythonPackage rec {
     "test_remote_code"
     "test_transformers_model"
 
+    # nondeterministic, tests GC behaviour by thresholding global ram usage
+    "test_free_memory_dereferences_prepared_components"
+
     # set the environment variable, CC, which conflicts with standard environment
     "test_patch_environment_key_exists"
   ] ++ lib.optionals (pythonAtLeast "3.12") [
@@ -81,6 +89,8 @@ buildPythonPackage rec {
   ] ++ lib.optionals (stdenv.isLinux && stdenv.isAarch64) [
     # usual aarch64-linux RuntimeError: DataLoader worker (pid(s) <...>) exited unexpectedly
     "CheckpointTest"
+    # TypeError: unsupported operand type(s) for /: 'NoneType' and 'int' (it seems cpuinfo doesn't work here)
+    "test_mpi_multicpu_config_cmd"
   ] ++ lib.optionals (!config.cudaSupport) [
     # requires ptxas from cudatoolkit, which is unfree
     "test_dynamo_extract_model"
@@ -101,6 +111,8 @@ buildPythonPackage rec {
     "accelerate"
   ];
 
+  __darwinAllowLocalNetworking = true;
+
   meta = with lib; {
     homepage = "https://huggingface.co/docs/accelerate";
     description = "A simple way to train and use PyTorch models with multi-GPU, TPU, mixed-precision";