Skip to content

Commit

Permalink
python312Packages.torchmetrics: 1.4.3 -> 1.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
GaetanLepage committed Oct 23, 2024
1 parent 2768c7d commit f17c560
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions pkgs/development/python-modules/torchmetrics/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,24 @@
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
pname = "torchmetrics";
version = "1.4.3";
version = "1.5.1";
in
buildPythonPackage {
inherit pname version;
Expand All @@ -38,28 +34,24 @@ buildPythonPackage {
owner = "Lightning-AI";
repo = "torchmetrics";
rev = "refs/tags/v${version}";
hash = "sha256-527cHPFdFw/JajHe7Kkz7+zl4EfePaLx77I2OTjjxaA=";
hash = "sha256-k3tmrJOn2mQN+RbUbxfjrE+2TJKHs5vHj9aGx8p8fZU=";
};

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 +65,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 f17c560

Please sign in to comment.