2020-01-13 21:55:46 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2020-12-03 18:21:06 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pytest_xdist
|
|
|
|
, pythonOlder
|
2020-05-09 17:50:17 +01:00
|
|
|
, matplotlib
|
2020-01-13 21:55:46 +00:00
|
|
|
, mock
|
|
|
|
, pytorch
|
|
|
|
, pynvml
|
2021-05-14 19:46:36 +01:00
|
|
|
, scikit-learn
|
2020-01-13 21:55:46 +00:00
|
|
|
, tqdm
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ignite";
|
2021-03-24 17:41:50 +00:00
|
|
|
version = "0.4.4.post1";
|
2020-01-13 21:55:46 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pytorch";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-03-24 17:41:50 +00:00
|
|
|
sha256 = "1a7vs4dzm5lmyck50ygi3j2d2wd6nxr5x91dpx0rmf97i6lywpyb";
|
2020-01-13 21:55:46 +00:00
|
|
|
};
|
|
|
|
|
2020-12-03 18:21:06 +00:00
|
|
|
checkInputs = [ pytestCheckHook matplotlib mock pytest_xdist ];
|
2021-05-14 19:46:36 +01:00
|
|
|
propagatedBuildInputs = [ pytorch scikit-learn tqdm pynvml ];
|
2020-01-13 21:55:46 +00:00
|
|
|
|
2020-12-03 18:21:06 +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-09 17:50:17 +01:00
|
|
|
# Some packages are not in NixPkgs; other tests try to build distributed
|
|
|
|
# models, which doesn't work in the sandbox.
|
2020-12-03 18:21:06 +00:00
|
|
|
# avoid tests which need special packages
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"--ignore=tests/ignite/contrib/handlers/test_trains_logger.py"
|
|
|
|
"--ignore=tests/ignite/metrics/test_dill.py"
|
|
|
|
"--ignore=tests/ignite/metrics/test_ssim.py"
|
|
|
|
"tests/"
|
|
|
|
];
|
|
|
|
|
|
|
|
# disable tests which need specific packages
|
|
|
|
disabledTests = [
|
|
|
|
"idist"
|
|
|
|
"tensorboard"
|
|
|
|
"mlflow"
|
|
|
|
"trains"
|
|
|
|
"visdom"
|
|
|
|
"test_setup_neptune"
|
|
|
|
"test_output_handler" # needs mlflow
|
|
|
|
"test_integration"
|
|
|
|
"test_pbar" # slight output differences
|
|
|
|
"test_write_results"
|
|
|
|
"test_setup_plx"
|
|
|
|
];
|
2020-01-13 21:55:46 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "High-level training library for PyTorch";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://pytorch.org/ignite";
|
2020-01-13 21:55:46 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.bcdarwin ];
|
|
|
|
};
|
|
|
|
}
|