Skip to content

Commit

Permalink
python312Packages.torchmetrics: 1.4.3 -> 1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
GaetanLepage committed Nov 12, 2024
1 parent 70e17e3 commit 367021d
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.6.0";
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-oyrJ3+Ez+MCkHdrElRWeRcM30SvpnWGG6wL8Ai9nhOY=";
};

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 367021d

Please sign in to comment.