Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python312Packages.torchmetrics: 1.4.3 -> 1.6.1 #350488

Merged
merged 1 commit into from
Jan 2, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading