python312Packages.torchmetrics: 1.4.3 -> 1.6.1 (#350488)

This commit is contained in:
Gaétan Lepage
2025-01-02 12:35:43 +01:00
committed by GitHub
@@ -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
@@ -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"
];