16 buildPythonPackage rec {
18 version = "0.5.0.post2";
19 format = "setuptools";
21 src = fetchFromGitHub {
24 rev = "refs/tags/v${version}";
25 hash = "sha256-Lg7ASODYwWWhC45X4+Bk50gSlSWwgn2tM4atLXWbQLI=";
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
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"
50 # disable tests which need specific packages
55 "test_gpu_info" # needs pynvml
57 "test_output_handler" # needs mlflow
58 "test_pbar" # slight output differences
59 "test_setup_clearml_logging"
68 description = "High-level training library for PyTorch";
69 homepage = "https://pytorch.org/ignite";
70 license = licenses.bsd3;
71 maintainers = [ maintainers.bcdarwin ];