ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / torchmetrics / default.nix
blobeee18b2cb7b31f7ef1d32cc0681cb7c740cca07a
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , cloudpickle
5 , scikit-learn
6 , scikitimage
7 , packaging
8 , psutil
9 , py-deprecate
10 , torch
11 , pytestCheckHook
12 , torchmetrics
13 , pytorch-lightning
16 let
17   pname = "torchmetrics";
18   version = "0.9.3";
20 buildPythonPackage {
21   inherit pname version;
23   src = fetchFromGitHub {
24     owner = "PyTorchLightning";
25     repo = "metrics";
26     rev = "refs/tags/v${version}";
27     hash = "sha256-L2p8UftRkuBuRJX4V5+OYkJeJ5pCK3MvfA1OvSfgglY=";
28   };
30   propagatedBuildInputs = [
31     packaging
32     py-deprecate
33   ];
35   # Let the user bring their own instance
36   buildInputs = [
37     torch
38   ];
40   checkInputs = [
41     pytorch-lightning
42     scikit-learn
43     scikitimage
44     cloudpickle
45     psutil
46     pytestCheckHook
47   ];
49   # A cyclic dependency in: integrations/test_lightning.py
50   doCheck = false;
51   passthru.tests.check = torchmetrics.overridePythonAttrs (_: {
52     doCheck = true;
53   });
55   disabledTestPaths = [
56     # These require too many "leftpad-level" dependencies
57     "tests/text"
58     "tests/audio"
59     "tests/image"
61     # A few non-deterministic things like test_check_compute_groups_is_faster
62     "tests/bases/test_collections.py"
63   ];
65   pythonImportsCheck = [
66     "torchmetrics"
67   ];
69   meta = with lib; {
70     description = "Machine learning metrics for distributed, scalable PyTorch applications (used in pytorch-lightning)";
71     homepage = "https://torchmetrics.readthedocs.io";
72     license = licenses.asl20;
73     maintainers = with maintainers; [
74       SomeoneSerge
75     ];
76   };