Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / ignite / default.nix
blob174ba8312745acf78fe9eb92678fc9af2d26151f
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , pytestCheckHook
5 , pytest-xdist
6 , torchvision
7 , pythonOlder
8 , matplotlib
9 , mock
10 , packaging
11 , torch
12 , scikit-learn
13 , tqdm
16 buildPythonPackage rec {
17   pname = "ignite";
18   version = "0.5.0.post2";
19   format = "setuptools";
21   src = fetchFromGitHub {
22     owner = "pytorch";
23     repo = pname;
24     rev = "refs/tags/v${version}";
25     hash = "sha256-Lg7ASODYwWWhC45X4+Bk50gSlSWwgn2tM4atLXWbQLI=";
26   };
28   nativeCheckInputs = [ pytestCheckHook matplotlib mock pytest-xdist torchvision ];
29   propagatedBuildInputs = [ packaging torch scikit-learn tqdm ];
31   # runs successfully in 3.9, however, async isn't correctly closed so it will fail after test suite.
32   doCheck = pythonOlder "3.9";
34   # Some packages are not in NixPkgs; other tests try to build distributed
35   # models, which doesn't work in the sandbox.
36   # avoid tests which need special packages
37   pytestFlagsArray = [
38     "--ignore=tests/ignite/contrib/handlers/test_clearml_logger.py"
39     "--ignore=tests/ignite/contrib/handlers/test_lr_finder.py"
40     "--ignore=tests/ignite/contrib/handlers/test_trains_logger.py"
41     "--ignore=tests/ignite/metrics/nlp/test_bleu.py"
42     "--ignore=tests/ignite/metrics/nlp/test_rouge.py"
43     "--ignore=tests/ignite/metrics/gan" # requires pytorch_fid; tries to download model to $HOME
44     "--ignore=tests/ignite/metrics/test_dill.py"
45     "--ignore=tests/ignite/metrics/test_psnr.py"
46     "--ignore=tests/ignite/metrics/test_ssim.py"
47     "tests/"
48   ];
50   # disable tests which need specific packages
51   disabledTests = [
52     "idist"
53     "mlflow"
54     "tensorboard"
55     "test_gpu_info" # needs pynvml
56     "test_integration"
57     "test_output_handler" # needs mlflow
58     "test_pbar" # slight output differences
59     "test_setup_clearml_logging"
60     "test_setup_neptune"
61     "test_setup_plx"
62     "test_write_results"
63     "trains"
64     "visdom"
65   ];
67   meta = with lib; {
68     description = "High-level training library for PyTorch";
69     homepage = "https://pytorch.org/ignite";
70     license = licenses.bsd3;
71     maintainers = [ maintainers.bcdarwin ];
72   };