2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytest
|
2020-05-15 21:57:56 +00:00
|
|
|
, matplotlib
|
2020-04-24 23:36:52 +00:00
|
|
|
, mock
|
|
|
|
, pytorch
|
|
|
|
, pynvml
|
|
|
|
, scikitlearn
|
|
|
|
, tqdm
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ignite";
|
2020-05-15 21:57:56 +00:00
|
|
|
version = "0.3.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pytorch";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2020-05-15 21:57:56 +00:00
|
|
|
sha256 = "0i863kxi1r1hspj19lhn6r8256vdazjcyvis0s33fgzrf7kxi08x";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
checkInputs = [ pytest matplotlib mock ];
|
|
|
|
propagatedBuildInputs = [ pytorch scikitlearn tqdm pynvml ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
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-04-24 23:36:52 +00:00
|
|
|
checkPhase = ''
|
2020-05-15 21:57:56 +00:00
|
|
|
pytest -k 'not visdom and not tensorboard and not mlflow and not polyaxon and not conftest and not engines and not distrib_' tests/
|
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 ];
|
|
|
|
};
|
|
|
|
}
|