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
|
|
|
|
, pytorch
|
|
|
|
, pynvml
|
2021-05-20 23:08:51 +00:00
|
|
|
, scikit-learn
|
2020-04-24 23:36:52 +00:00
|
|
|
, tqdm
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ignite";
|
2021-08-08 23:34:03 +00:00
|
|
|
version = "0.4.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pytorch";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-08-08 23:34:03 +00:00
|
|
|
sha256 = "sha256-dlKGXjUUnyYmPDilo0LQg9OkSkBnMYNgzlFLIfI0T6I=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-08-08 23:34:03 +00:00
|
|
|
checkInputs = [ pytestCheckHook matplotlib mock pytest-xdist torchvision ];
|
2021-05-20 23:08:51 +00:00
|
|
|
propagatedBuildInputs = [ pytorch scikit-learn tqdm pynvml ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-12-07 07:45:13 +00:00
|
|
|
# runs succesfully in 3.9, however, async isn't correctly closed so it will fail after test suite.
|
|
|
|
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"
|
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 ];
|
|
|
|
};
|
|
|
|
}
|