22 pname = "torchmetrics";
26 inherit pname version;
29 src = fetchFromGitHub {
30 owner = "Lightning-AI";
31 repo = "torchmetrics";
32 rev = "refs/tags/v${version}";
33 hash = "sha256-g5JuTbiRd8yWx2nM3UE8ejOhuZ0XpAQdS5AC9AlrSFY=";
36 disabled = pythonOlder "3.8";
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 license = licenses.asl20;
94 maintainers = with maintainers; [