1{ lib
2, addict
3, buildPythonPackage
4, coverage
5, fetchFromGitHub
6, lmdb
7, matplotlib
8, mlflow
9, numpy
10, opencv4
11, parameterized
12, pytestCheckHook
13, pythonOlder
14, pyyaml
15, rich
16, termcolor
17, torch
18, yapf
19}:
20
21buildPythonPackage rec {
22 pname = "mmengine";
23 version = "0.8.4";
24 format = "setuptools";
25
26 disabled = pythonOlder "3.7";
27
28 src = fetchFromGitHub {
29 owner = "open-mmlab";
30 repo = pname;
31 rev = "refs/tags/v${version}";
32 hash = "sha256-kJhcw6Hpzx3s5WHeLTF8pydbAKXwfVgvxo7SsSN5gls=";
33 };
34
35 propagatedBuildInputs = [
36 addict
37 matplotlib
38 numpy
39 opencv4
40 pyyaml
41 rich
42 termcolor
43 yapf
44 ];
45
46 nativeCheckInputs = [
47 coverage
48 lmdb
49 mlflow
50 torch
51 parameterized
52 pytestCheckHook
53 ];
54
55 preCheck = ''
56 export HOME=$TMPDIR
57 '';
58
59 pythonImportsCheck = [
60 "mmengine"
61 ];
62
63 disabledTestPaths = [
64 # AttributeError
65 "tests/test_fileio/test_backends/test_petrel_backend.py"
66 ];
67
68 disabledTests = [
69 # Tests are disabled due to sandbox
70 "test_fileclient"
71 "test_http_backend"
72 "test_misc"
73 # RuntimeError
74 "test_dump"
75 "test_deepcopy"
76 "test_copy"
77 "test_lazy_import"
78 # AssertionError
79 "test_lazy_module"
80 ];
81
82 meta = with lib; {
83 description = "Library for training deep learning models based on PyTorch";
84 homepage = "https://github.com/open-mmlab/mmengine";
85 changelog = "https://github.com/open-mmlab/mmengine/releases/tag/v${version}";
86 license = with licenses; [ asl20 ];
87 maintainers = with maintainers; [ rxiao ];
88 };
89}