2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pytestCheckHook,
|
|
|
|
pytest-xdist,
|
|
|
|
torchvision,
|
|
|
|
pythonOlder,
|
|
|
|
matplotlib,
|
|
|
|
mock,
|
|
|
|
packaging,
|
|
|
|
torch,
|
|
|
|
scikit-learn,
|
|
|
|
tqdm,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ignite";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.5.0.post2";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
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}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-Lg7ASODYwWWhC45X4+Bk50gSlSWwgn2tM4atLXWbQLI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
matplotlib
|
|
|
|
mock
|
|
|
|
pytest-xdist
|
|
|
|
torchvision
|
|
|
|
];
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|