Skip to content

Commit e1e8a6b

Browse files
authored
python312Packages.mmengine: fix pytorch 2.6.0 compat (#404344)
2 parents e95a234 + 2462d73 commit e1e8a6b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

pkgs/development/python-modules/mmengine/default.nix

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
lib,
33
buildPythonPackage,
44
fetchFromGitHub,
5+
fetchpatch,
56

67
# build-system
78
setuptools,
@@ -41,6 +42,16 @@ buildPythonPackage rec {
4142
hash = "sha256-hQnwenuxHQwl+DwQXbIfsKlJkmcRvcHV1roK7q2X1KA=";
4243
};
4344

45+
patches = [
46+
# Explicitly disable weights_only in torch.load calls
47+
# https://github.com/open-mmlab/mmengine/pull/1650
48+
(fetchpatch {
49+
name = "torch-2.6.0-compat.patch";
50+
url = "https://github.com/open-mmlab/mmengine/pull/1650/commits/c21b8431b2c625560a3866c65328cff0380ba1f8.patch";
51+
hash = "sha256-SLr030IdYD9wM/jPJuZd+Dr1jjFx/5/YkJj/IwhnNQg=";
52+
})
53+
];
54+
4455
build-system = [ setuptools ];
4556

4657
dependencies = [

0 commit comments

Comments
 (0)