aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/python-modules/ignite/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/development/python-modules/ignite/default.nix')
-rw-r--r--infra/libkookie/nixpkgs/pkgs/development/python-modules/ignite/default.nix38
1 files changed, 31 insertions, 7 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/development/python-modules/ignite/default.nix b/infra/libkookie/nixpkgs/pkgs/development/python-modules/ignite/default.nix
index 785ec5814918..307c25e724ee 100644
--- a/infra/libkookie/nixpkgs/pkgs/development/python-modules/ignite/default.nix
+++ b/infra/libkookie/nixpkgs/pkgs/development/python-modules/ignite/default.nix
@@ -1,7 +1,9 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
-, pytest
+, pytestCheckHook
+, pytest_xdist
+, pythonOlder
, matplotlib
, mock
, pytorch
@@ -12,23 +14,45 @@
buildPythonPackage rec {
pname = "ignite";
- version = "0.3.0";
+ version = "0.4.2";
src = fetchFromGitHub {
owner = "pytorch";
repo = pname;
rev = "v${version}";
- sha256 = "0i863kxi1r1hspj19lhn6r8256vdazjcyvis0s33fgzrf7kxi08x";
+ sha256 = "00vcmhnp14s54g386izgaxzrdr2nqv3pz9nvpyiwrn33zawr308z";
};
- checkInputs = [ pytest matplotlib mock ];
+ checkInputs = [ pytestCheckHook matplotlib mock pytest_xdist ];
propagatedBuildInputs = [ pytorch scikitlearn tqdm pynvml ];
+ # runs succesfully in 3.9, however, async isn't correctly closed so it will fail after test suite.
+ doCheck = pythonOlder "3.9";
+
# Some packages are not in NixPkgs; other tests try to build distributed
# models, which doesn't work in the sandbox.
- checkPhase = ''
- pytest -k 'not visdom and not tensorboard and not mlflow and not polyaxon and not conftest and not engines and not distrib_' tests/
- '';
+ # 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"
+ ];
meta = with lib; {
description = "High-level training library for PyTorch";