Skip to content

Commit

Permalink
python312Packages.torchmetrics: 1.4.3 -> 1.6.1 (NixOS#350488)
Browse files Browse the repository at this point in the history
  • Loading branch information
GaetanLepage authored Jan 2, 2025
2 parents a7fa74c + ef63f5b commit 7cb9646
Showing 1 changed file with 13 additions and 20 deletions.
33 changes: 13 additions & 20 deletions pkgs/development/python-modules/torchmetrics/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,59 +7,48 @@
numpy,
lightning-utilities,
packaging,
pretty-errors,

# buildInputs
torch,

# tests
cloudpickle,
psutil,
pytestCheckHook,
pytest-doctestplus,
pytest-xdist,
pytorch-lightning,
scikit-image,
scikit-learn,

# passthru
torchmetrics,
}:

let
buildPythonPackage rec {
pname = "torchmetrics";
version = "1.4.3";
in
buildPythonPackage {
inherit pname version;
version = "1.6.1";
pyproject = true;

src = fetchFromGitHub {
owner = "Lightning-AI";
repo = "torchmetrics";
rev = "refs/tags/v${version}";
hash = "sha256-527cHPFdFw/JajHe7Kkz7+zl4EfePaLx77I2OTjjxaA=";
tag = "v${version}";
hash = "sha256-itLFJB920hQGX2VLOLolHhmXFVHAOkfRRFtUGB9neKM=";
};

dependencies = [
numpy
lightning-utilities
packaging
pretty-errors
];

# Let the user bring their own instance
buildInputs = [ torch ];

nativeCheckInputs = [
cloudpickle
psutil
pytestCheckHook
pytest-doctestplus
pytest-xdist
pytorch-lightning
scikit-image
scikit-learn
];

# A cyclic dependency in: integrations/test_lightning.py
Expand All @@ -73,16 +62,20 @@ buildPythonPackage {
dontInstall = true;
});

disabledTests = [
# `IndexError: list index out of range`
"test_metric_lightning_log"
];

disabledTestPaths = [
# These require too many "leftpad-level" dependencies
# Also too cross-dependent
"tests/unittests"

# AttributeError: partially initialized module 'pesq' has no attribute 'pesq' (most likely due to a circular import)
"examples/audio/pesq.py"

# Require internet access
"examples/text/bertscore.py"
"examples/image/clip_score.py"
"examples/text/perplexity.py"
"examples/text/rouge.py"

# A trillion import path mismatch errors
"src/torchmetrics"
];
Expand Down

0 comments on commit 7cb9646

Please sign in to comment.