diff options
Diffstat (limited to 'pkgs/development/python-modules/mmengine/default.nix')
-rw-r--r-- | pkgs/development/python-modules/mmengine/default.nix | 73 |
1 files changed, 40 insertions, 33 deletions
diff --git a/pkgs/development/python-modules/mmengine/default.nix b/pkgs/development/python-modules/mmengine/default.nix index 347d22d569e05..7187fe809875b 100644 --- a/pkgs/development/python-modules/mmengine/default.nix +++ b/pkgs/development/python-modules/mmengine/default.nix @@ -1,21 +1,23 @@ -{ lib -, addict -, buildPythonPackage -, coverage -, fetchFromGitHub -, lmdb -, matplotlib -, mlflow -, numpy -, opencv4 -, parameterized -, pytestCheckHook -, pythonOlder -, pyyaml -, rich -, termcolor -, torch -, yapf +{ + lib, + addict, + buildPythonPackage, + coverage, + fetchFromGitHub, + lmdb, + matplotlib, + mlflow, + numpy, + opencv4, + parameterized, + pytestCheckHook, + pythonOlder, + pyyaml, + rich, + setuptools, + termcolor, + torch, + yapf, }: buildPythonPackage rec { @@ -32,7 +34,9 @@ buildPythonPackage rec { hash = "sha256-fKtPDdeKB3vX2mD+Tsicq8KOkPDSACzKK1XLyugdPQ4="; }; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ addict matplotlib numpy @@ -47,24 +51,23 @@ buildPythonPackage rec { coverage lmdb mlflow - torch parameterized pytestCheckHook + torch ]; - preCheck = '' - export HOME=$TMPDIR - '' - # Otherwise, the backprop hangs forever. More precisely, this exact line: - # https://github.com/open-mmlab/mmengine/blob/02f80e8bdd38f6713e04a872304861b02157905a/tests/test_runner/test_activation_checkpointing.py#L46 - # Solution suggested in https://github.com/pytorch/pytorch/issues/91547#issuecomment-1370011188 - + '' - export MKL_NUM_THREADS=1 - ''; + preCheck = + '' + export HOME=$TMPDIR + '' + # Otherwise, the backprop hangs forever. More precisely, this exact line: + # https://github.com/open-mmlab/mmengine/blob/02f80e8bdd38f6713e04a872304861b02157905a/tests/test_runner/test_activation_checkpointing.py#L46 + # Solution suggested in https://github.com/pytorch/pytorch/issues/91547#issuecomment-1370011188 + + '' + export MKL_NUM_THREADS=1 + ''; - pythonImportsCheck = [ - "mmengine" - ]; + pythonImportsCheck = [ "mmengine" ]; disabledTestPaths = [ # AttributeError @@ -87,7 +90,6 @@ buildPythonPackage rec { "test_lazy_import" # AssertionError "test_lazy_module" - # Require unpackaged aim "test_experiment" "test_add_config" @@ -97,6 +99,11 @@ buildPythonPackage rec { "test_close" ]; + pytestFlagsArray = [ + "-W" + "ignore::pytest.PytestRemovedIn8Warning" + ]; + meta = with lib; { description = "Library for training deep learning models based on PyTorch"; homepage = "https://github.com/open-mmlab/mmengine"; |