16 buildPythonPackage rec {
20 src = fetchFromGitHub {
23 rev = "refs/tags/v${version}";
24 hash = "sha256-+olp+zphcHMvcGKHt0JhxXza1wd7UiydwVFnSQ310Vg=";
27 nativeCheckInputs = [ pytestCheckHook matplotlib mock pytest-xdist torchvision ];
28 propagatedBuildInputs = [ packaging torch scikit-learn tqdm ];
30 # runs successfully in 3.9, however, async isn't correctly closed so it will fail after test suite.
31 doCheck = pythonOlder "3.9";
33 # Some packages are not in NixPkgs; other tests try to build distributed
34 # models, which doesn't work in the sandbox.
35 # avoid tests which need special packages
37 "--ignore=tests/ignite/contrib/handlers/test_clearml_logger.py"
38 "--ignore=tests/ignite/contrib/handlers/test_lr_finder.py"
39 "--ignore=tests/ignite/contrib/handlers/test_trains_logger.py"
40 "--ignore=tests/ignite/metrics/nlp/test_bleu.py"
41 "--ignore=tests/ignite/metrics/nlp/test_rouge.py"
42 "--ignore=tests/ignite/metrics/gan" # requires pytorch_fid; tries to download model to $HOME
43 "--ignore=tests/ignite/metrics/test_dill.py"
44 "--ignore=tests/ignite/metrics/test_psnr.py"
45 "--ignore=tests/ignite/metrics/test_ssim.py"
49 # disable tests which need specific packages
54 "test_gpu_info" # needs pynvml
56 "test_output_handler" # needs mlflow
57 "test_pbar" # slight output differences
58 "test_setup_clearml_logging"
67 description = "High-level training library for PyTorch";
68 homepage = "https://pytorch.org/ignite";
69 license = licenses.bsd3;
70 maintainers = [ maintainers.bcdarwin ];