22 pname = "torchmetrics";
26 inherit pname version;
29 disabled = pythonOlder "3.8";
31 src = fetchFromGitHub {
32 owner = "Lightning-AI";
33 repo = "torchmetrics";
34 rev = "refs/tags/v${version}";
35 hash = "sha256-0lverGF8HVlnwWmnCjScWoSfWPLZlMF2cHDG+uxNCCQ=";
38 propagatedBuildInputs = [
45 # Let the user bring their own instance
61 # A cyclic dependency in: integrations/test_lightning.py
63 passthru.tests.check = torchmetrics.overridePythonAttrs (_: {
64 pname = "${pname}-check";
66 # We don't have to install because the only purpose
67 # of this passthru test is to, well, test.
68 # This fixes having to set `catchConflicts` to false.
73 # `IndexError: list index out of range`
74 "test_metric_lightning_log"
78 # These require too many "leftpad-level" dependencies
79 # Also too cross-dependent
82 # A trillion import path mismatch errors
86 pythonImportsCheck = [
91 description = "Machine learning metrics for distributed, scalable PyTorch applications (used in pytorch-lightning)";
92 homepage = "https://lightning.ai/docs/torchmetrics/";
93 changelog = "https://github.com/Lightning-AI/torchmetrics/releases/tag/v${version}";
94 license = licenses.asl20;
95 maintainers = with maintainers; [