2023-05-24 13:37:59 +00:00
|
|
|
{ lib
|
2023-08-10 07:59:29 +00:00
|
|
|
, addict
|
2023-05-24 13:37:59 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, coverage
|
2023-08-10 07:59:29 +00:00
|
|
|
, fetchFromGitHub
|
2023-05-24 13:37:59 +00:00
|
|
|
, lmdb
|
|
|
|
, matplotlib
|
2023-08-10 07:59:29 +00:00
|
|
|
, mlflow
|
2023-05-24 13:37:59 +00:00
|
|
|
, numpy
|
2023-08-10 07:59:29 +00:00
|
|
|
, opencv4
|
|
|
|
, parameterized
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2023-05-24 13:37:59 +00:00
|
|
|
, pyyaml
|
|
|
|
, rich
|
|
|
|
, termcolor
|
2023-08-10 07:59:29 +00:00
|
|
|
, torch
|
|
|
|
, yapf
|
2023-05-24 13:37:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "mmengine";
|
2023-08-10 07:59:29 +00:00
|
|
|
version = "0.8.4";
|
2023-05-24 13:37:59 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "open-mmlab";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/v${version}";
|
2023-08-10 07:59:29 +00:00
|
|
|
hash = "sha256-kJhcw6Hpzx3s5WHeLTF8pydbAKXwfVgvxo7SsSN5gls=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
addict
|
|
|
|
matplotlib
|
|
|
|
numpy
|
2023-08-10 07:59:29 +00:00
|
|
|
opencv4
|
2023-05-24 13:37:59 +00:00
|
|
|
pyyaml
|
|
|
|
rich
|
|
|
|
termcolor
|
|
|
|
yapf
|
2023-08-10 07:59:29 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
coverage
|
|
|
|
lmdb
|
|
|
|
mlflow
|
|
|
|
torch
|
|
|
|
parameterized
|
|
|
|
pytestCheckHook
|
2023-05-24 13:37:59 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$TMPDIR
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"mmengine"
|
|
|
|
];
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# AttributeError
|
|
|
|
"tests/test_fileio/test_backends/test_petrel_backend.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Tests are disabled due to sandbox
|
|
|
|
"test_fileclient"
|
|
|
|
"test_http_backend"
|
|
|
|
"test_misc"
|
|
|
|
# RuntimeError
|
|
|
|
"test_dump"
|
|
|
|
"test_deepcopy"
|
|
|
|
"test_copy"
|
|
|
|
"test_lazy_import"
|
|
|
|
# AssertionError
|
|
|
|
"test_lazy_module"
|
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
meta = with lib; {
|
2023-08-10 07:59:29 +00:00
|
|
|
description = "Library for training deep learning models based on PyTorch";
|
2023-05-24 13:37:59 +00:00
|
|
|
homepage = "https://github.com/open-mmlab/mmengine";
|
|
|
|
changelog = "https://github.com/open-mmlab/mmengine/releases/tag/v${version}";
|
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ rxiao ];
|
|
|
|
};
|
|
|
|
}
|