diff options
author | OTABI Tomoya <tomoya.otabi@gmail.com> | 2023-11-10 18:03:52 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-10 18:03:52 +0900 |
commit | c77c7b2aa369f359b8443747715b632345c642af (patch) | |
tree | 88fef70f8f732460451a0253839825f3f570e72c /pkgs/development/python-modules/accelerate/default.nix | |
parent | bef48fa3e6fd5be4bbe82c0adf9f7e6639f29862 (diff) | |
parent | 42baf8f175a84f9536aa152c910cbe22c01f006a (diff) |
Merge pull request #265566 from natsukium/accelerate/fix-darwin
python311Packages.accelerate: fix build when torch.distributed is disabled
Diffstat (limited to 'pkgs/development/python-modules/accelerate/default.nix')
-rw-r--r-- | pkgs/development/python-modules/accelerate/default.nix | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/accelerate/default.nix b/pkgs/development/python-modules/accelerate/default.nix index b685b5ff14ba..24ed871c4037 100644 --- a/pkgs/development/python-modules/accelerate/default.nix +++ b/pkgs/development/python-modules/accelerate/default.nix @@ -2,6 +2,7 @@ , lib , buildPythonPackage , fetchFromGitHub +, fetchpatch , pythonAtLeast , pythonOlder , pytestCheckHook @@ -29,6 +30,15 @@ buildPythonPackage rec { hash = "sha256-DKyFb+4DUMhVUwr+sgF2IaJS9pEj2o2shGYwExfffWg="; }; + patches = [ + # https://github.com/huggingface/accelerate/pull/2121 + (fetchpatch { + name = "fix-import-error-without-torch_distributed.patch"; + url = "https://github.com/huggingface/accelerate/commit/42048092eabd67a407ea513a62f2acde97079fbc.patch"; + hash = "sha256-9lvnU6z5ZEFc5RVw2bP0cGVyrwAp/pxX4ZgnmCN7qH8="; + }) + ]; + nativeBuildInputs = [ setuptools ]; propagatedBuildInputs = [ |