diff --git a/pkgs/development/python-modules/pomegranate/default.nix b/pkgs/development/python-modules/pomegranate/default.nix index 62b8c9f260e0..cd1dc05dec77 100644 --- a/pkgs/development/python-modules/pomegranate/default.nix +++ b/pkgs/development/python-modules/pomegranate/default.nix @@ -21,16 +21,40 @@ buildPythonPackage rec { pname = "pomegranate"; - version = "1.1.0"; + version = "1.1.2"; pyproject = true; src = fetchFromGitHub { repo = "pomegranate"; owner = "jmschrei"; - tag = "v${version}"; - hash = "sha256-p2Gn0FXnsAHvRUeAqx4M1KH0+XvDl3fmUZZ7MiMvPSs="; + # tag = "v${version}"; + # No tag for 1.1.2 + rev = "e9162731f4f109b7b17ecffde768734cacdb839b"; + hash = "sha256-vVoAoZ+mph11ZfINT+yxRyk9rXv6FBDgxBz56P2K95Y="; }; + # _pickle.UnpicklingError: Weights only load failed. + # https://pytorch.org/docs/stable/generated/torch.load.html + postPatch = '' + substituteInPlace \ + tests/distributions/test_bernoulli.py \ + tests/distributions/test_categorical.py \ + tests/distributions/test_exponential.py \ + tests/distributions/test_gamma.py \ + tests/distributions/test_independent_component.py \ + tests/distributions/test_normal_diagonal.py \ + tests/distributions/test_normal_full.py \ + tests/distributions/test_poisson.py \ + tests/distributions/test_student_t.py \ + tests/distributions/test_uniform.py \ + tests/test_bayes_classifier.py \ + tests/test_gmm.py \ + tests/test_kmeans.py \ + --replace-fail \ + 'torch.load(".pytest.torch")' \ + 'torch.load(".pytest.torch", weights_only=False)' + ''; + build-system = [ setuptools ]; dependencies = [