2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2020-12-07 07:45:13 +00:00
|
|
|
, pytestCheckHook
|
2021-07-24 12:14:16 +00:00
|
|
|
, pytest-xdist
|
2021-08-08 23:34:03 +00:00
|
|
|
, torchvision
|
2020-12-07 07:45:13 +00:00
|
|
|
, pythonOlder
|
2020-05-15 21:57:56 +00:00
|
|
|
, matplotlib
|
2020-04-24 23:36:52 +00:00
|
|
|
, mock
|
2022-08-12 12:06:08 +00:00
|
|
|
, packaging
|
2022-09-09 14:08:57 +00:00
|
|
|
, torch
|
2021-05-20 23:08:51 +00:00
|
|
|
, scikit-learn
|
2020-04-24 23:36:52 +00:00
|
|
|
, tqdm
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ignite";
|
2022-09-11 15:47:08 +00:00
|
|
|
version = "0.4.10";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pytorch";
|
|
|
|
repo = pname;
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2022-09-11 15:47:08 +00:00
|
|
|
sha256 = "sha256-mMiEVenDBNmeXMrDSZamUpnSm+4BQEgfK89zxIaFMio=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-08-08 23:34:03 +00:00
|
|
|
checkInputs = [ pytestCheckHook matplotlib mock pytest-xdist torchvision ];
|
2022-09-09 14:08:57 +00:00
|
|
|
propagatedBuildInputs = [ packaging torch scikit-learn tqdm ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
# runs successfully in 3.9, however, async isn't correctly closed so it will fail after test suite.
|
2020-12-07 07:45:13 +00:00
|
|
|
doCheck = pythonOlder "3.9";
|
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
# Some packages are not in NixPkgs; other tests try to build distributed
|
|
|
|
# models, which doesn't work in the sandbox.
|
2020-12-07 07:45:13 +00:00
|
|
|
# avoid tests which need special packages
|
|
|
|
pytestFlagsArray = [
|
2021-08-05 21:33:18 +00:00
|
|
|
"--ignore=tests/ignite/contrib/handlers/test_clearml_logger.py"
|
|
|
|
"--ignore=tests/ignite/contrib/handlers/test_lr_finder.py"
|
2020-12-07 07:45:13 +00:00
|
|
|
"--ignore=tests/ignite/contrib/handlers/test_trains_logger.py"
|
2021-08-05 21:33:18 +00:00
|
|
|
"--ignore=tests/ignite/metrics/nlp/test_bleu.py"
|
|
|
|
"--ignore=tests/ignite/metrics/nlp/test_rouge.py"
|
2021-08-08 23:34:03 +00:00
|
|
|
"--ignore=tests/ignite/metrics/gan" # requires pytorch_fid; tries to download model to $HOME
|
2020-12-07 07:45:13 +00:00
|
|
|
"--ignore=tests/ignite/metrics/test_dill.py"
|
2021-08-05 21:33:18 +00:00
|
|
|
"--ignore=tests/ignite/metrics/test_psnr.py"
|
2020-12-07 07:45:13 +00:00
|
|
|
"--ignore=tests/ignite/metrics/test_ssim.py"
|
|
|
|
"tests/"
|
|
|
|
];
|
|
|
|
|
|
|
|
# disable tests which need specific packages
|
|
|
|
disabledTests = [
|
|
|
|
"idist"
|
|
|
|
"mlflow"
|
2021-08-05 21:33:18 +00:00
|
|
|
"tensorboard"
|
2021-12-06 16:07:01 +00:00
|
|
|
"test_gpu_info" # needs pynvml
|
2020-12-07 07:45:13 +00:00
|
|
|
"test_integration"
|
2021-08-05 21:33:18 +00:00
|
|
|
"test_output_handler" # needs mlflow
|
2020-12-07 07:45:13 +00:00
|
|
|
"test_pbar" # slight output differences
|
2021-08-05 21:33:18 +00:00
|
|
|
"test_setup_clearml_logging"
|
|
|
|
"test_setup_neptune"
|
2020-12-07 07:45:13 +00:00
|
|
|
"test_setup_plx"
|
2021-08-05 21:33:18 +00:00
|
|
|
"test_write_results"
|
|
|
|
"trains"
|
|
|
|
"visdom"
|
2020-12-07 07:45:13 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "High-level training library for PyTorch";
|
|
|
|
homepage = "https://pytorch.org/ignite";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.bcdarwin ];
|
|
|
|
};
|
|
|
|
}
|