Commit 2462d73f authored by Gaetan Lepage's avatar Gaetan Lepage
Browse files

python312Packages.mmengine: fix pytorch 2.6.0 compat

parent eadb306f
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  fetchpatch,

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

  patches = [
    # Explicitly disable weights_only in torch.load calls
    # https://github.com/open-mmlab/mmengine/pull/1650
    (fetchpatch {
      name = "torch-2.6.0-compat.patch";
      url = "https://github.com/open-mmlab/mmengine/pull/1650/commits/c21b8431b2c625560a3866c65328cff0380ba1f8.patch";
      hash = "sha256-SLr030IdYD9wM/jPJuZd+Dr1jjFx/5/YkJj/IwhnNQg=";
    })
  ];

  build-system = [ setuptools ];

  dependencies = [