nixpkgs/pkgs/development/python-modules/ignite/default.nix

40 lines
950 B
Nix
Raw Normal View History

2020-01-13 21:55:46 +00:00
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytest
2020-05-09 16:50:17 +00:00
, matplotlib
2020-01-13 21:55:46 +00:00
, mock
, pytorch
, pynvml
, scikitlearn
, tqdm
}:
buildPythonPackage rec {
pname = "ignite";
2020-05-09 16:50:17 +00:00
version = "0.3.0";
2020-01-13 21:55:46 +00:00
src = fetchFromGitHub {
owner = "pytorch";
repo = pname;
rev = "v${version}";
2020-05-09 16:50:17 +00:00
sha256 = "0i863kxi1r1hspj19lhn6r8256vdazjcyvis0s33fgzrf7kxi08x";
2020-01-13 21:55:46 +00:00
};
2020-05-09 16:50:17 +00:00
checkInputs = [ pytest matplotlib mock ];
propagatedBuildInputs = [ pytorch scikitlearn tqdm pynvml ];
2020-01-13 21:55:46 +00:00
2020-05-09 16:50:17 +00:00
# Some packages are not in NixPkgs; other tests try to build distributed
# models, which doesn't work in the sandbox.
2020-01-13 21:55:46 +00:00
checkPhase = ''
2020-05-09 16:50:17 +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-01-13 21:55:46 +00:00
'';
meta = with lib; {
description = "High-level training library for PyTorch";
homepage = "https://pytorch.org/ignite";
2020-01-13 21:55:46 +00:00
license = licenses.bsd3;
maintainers = [ maintainers.bcdarwin ];
};
}