Merge pull request #265566 from natsukium/accelerate/fix-darwin
python311Packages.accelerate: fix build when torch.distributed is disabled
This commit is contained in:
commit
c77c7b2aa3
@ -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 = [
|
||||
|
Loading…
Reference in New Issue
Block a user