From e561fe29c94be01555d077639dda5d2c70e3ab4d Mon Sep 17 00:00:00 2001 From: HAOCHENYE <21724054@zju.edu.cn> Date: Thu, 21 Sep 2023 15:50:44 +0800 Subject: [PATCH 01/12] Support install mmengine lite --- .circleci/test.yml | 27 ++++++++++++++++++++++ docs/en/get_started/installation.md | 10 ++++++++ docs/zh_cn/get_started/installation.md | 10 ++++++++ setup.py | 32 +++++++++++++++----------- 4 files changed, 65 insertions(+), 14 deletions(-) diff --git a/.circleci/test.yml b/.circleci/test.yml index dd2f268b3c..1f36405bd7 100644 --- a/.circleci/test.yml +++ b/.circleci/test.yml @@ -54,6 +54,33 @@ jobs: name: Run unit tests command: pytest tests/test_config tests/test_registry tests/test_fileio tests/test_logging tests/test_utils --ignore=tests/test_utils/test_dl_utils + build_lite: + parameters: + # The python version must match available image tags in + # https://circleci.com/developer/images/image/cimg/python + python: + type: string + default: "3.7.4" + docker: + - image: cimg/python:<< parameters.python >> + resource_class: large + steps: + - checkout + - run: + name: Upgrade pip + command: | + pip install pip --upgrade + pip --version + - run: + name: Build MMEngine from source + command: MMENGINE_LITE=1 pip install -e -v + - run: + name: Install unit tests dependencies + command: pip install -r requirements/tests.txt + - run: + name: Run unit tests + command: pytest tests/test_config tests/test_registry tests/test_fileio tests/test_logging tests/test_utils --ignore=tests/test_utils/test_dl_utils + build_cpu: parameters: # The python version must match available image tags in diff --git a/docs/en/get_started/installation.md b/docs/en/get_started/installation.md index 45a7affab3..3ed5e408a9 100644 --- a/docs/en/get_started/installation.md +++ b/docs/en/get_started/installation.md @@ -35,10 +35,17 @@ pip install -U openmim mim install mmengine ``` +If you only want to use fileio, registry and configs in MMEngine, you can install mmengine lite: + +```bash +MMENGINE_LITE=1 mim install mmengine +``` + ### Install with pip ```bash pip install mmengine +# MMENGINE_LITE=1 pip install mmengine ``` ### Use docker images @@ -64,6 +71,9 @@ pip install mmengine git clone https://github.com/open-mmlab/mmengine.git cd mmengine pip install -e . -v + +# If you only want to use fileio, registry and configs in MMEngine, you can install mmengine lite: +# MMENGINE_LITE=1 pip install -e . -v ``` ### Verify the Installation diff --git a/docs/zh_cn/get_started/installation.md b/docs/zh_cn/get_started/installation.md index 917a256772..969256f849 100644 --- a/docs/zh_cn/get_started/installation.md +++ b/docs/zh_cn/get_started/installation.md @@ -35,10 +35,17 @@ pip install -U openmim mim install mmengine ``` +如果你只想使用 MMEngine 中的 fileio、registry 和 configs,可以安装 mmengine lite: + +```bash +MMENGINE_LITE=1 mim install mmengine +``` + ### 使用 pip 安装 ```bash pip install mmengine +# MMENGINE_LITE=1 pip install mmengine ``` ### 使用 docker 镜像 @@ -64,6 +71,9 @@ pip install mmengine git clone https://github.com/open-mmlab/mmengine.git cd mmengine pip install -e . -v + +# If you only want to use fileio, registry and configs in MMEngine, you can install mmengine lite: +# MMENGINE_LITE=1 pip install -e . -v ``` ## 验证安装 diff --git a/setup.py b/setup.py index 1d358e14ca..127dcdc529 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,4 @@ +import os import re from setuptools import find_packages, setup # type: ignore @@ -106,20 +107,23 @@ def gen_packages_items(): return packages -install_requires = parse_requirements() -try: - # OpenCV installed via conda. - import cv2 # NOQA: F401 - major, minor, *rest = cv2.__version__.split('.') - if int(major) < 3: - raise RuntimeError( - f'OpenCV >=3 is required but {cv2.__version__} is installed') -except ImportError: - # If first not installed install second package - CHOOSE_INSTALL_REQUIRES = [('opencv-python-headless>=3', - 'opencv-python>=3')] - for main, secondary in CHOOSE_INSTALL_REQUIRES: - install_requires.append(choose_requirement(main, secondary)) +if int(os.getenv('MMENGINE_LITE', '0')) == 1: + install_requires = parse_requirements('requirements/runtime_lite.txt') +else: + install_requires = parse_requirements() + try: + # OpenCV installed via conda. + import cv2 # NOQA: F401 + major, minor, *rest = cv2.__version__.split('.') + if int(major) < 3: + raise RuntimeError( + f'OpenCV >=3 is required but {cv2.__version__} is installed') + except ImportError: + # If first not installed install second package + CHOOSE_INSTALL_REQUIRES = [('opencv-python-headless>=3', + 'opencv-python>=3')] + for main, secondary in CHOOSE_INSTALL_REQUIRES: + install_requires.append(choose_requirement(main, secondary)) setup( name='mmengine', From 2bf8df4fe4038669df2ef3eb872e6fdad32ae653 Mon Sep 17 00:00:00 2001 From: HAOCHENYE <21724054@zju.edu.cn> Date: Thu, 21 Sep 2023 20:11:09 +0800 Subject: [PATCH 02/12] Fix --- .circleci/test.yml | 8 ++++++-- requirements/runtime_lite.txt | 7 +++++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 requirements/runtime_lite.txt diff --git a/.circleci/test.yml b/.circleci/test.yml index 1f36405bd7..a06794c74c 100644 --- a/.circleci/test.yml +++ b/.circleci/test.yml @@ -73,7 +73,7 @@ jobs: pip --version - run: name: Build MMEngine from source - command: MMENGINE_LITE=1 pip install -e -v + command: MMENGINE_LITE=1 pip install -e . -v - run: name: Install unit tests dependencies command: pip install -r requirements/tests.txt @@ -244,10 +244,14 @@ workflows: branches: ignore: - main + - build_lite: + name: build lite + requires: + - lint - build_without_torch: name: build without torch requires: - - lint + - build_lite - build_cpu: name: minimum_version_cpu torch: 1.6.0 diff --git a/requirements/runtime_lite.txt b/requirements/runtime_lite.txt new file mode 100644 index 0000000000..1c396a63d6 --- /dev/null +++ b/requirements/runtime_lite.txt @@ -0,0 +1,7 @@ +addict +numpy +pyyaml +regex;sys_platform=='win32' +rich +termcolor +yapf From b9fb47d89912fa33df982ec6fd4aafb8eecff136 Mon Sep 17 00:00:00 2001 From: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com> Date: Sat, 7 Oct 2023 18:57:53 +0800 Subject: [PATCH 03/12] Update installation.md --- docs/en/get_started/installation.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/docs/en/get_started/installation.md b/docs/en/get_started/installation.md index 3ed5e408a9..6ee0a0ab3a 100644 --- a/docs/en/get_started/installation.md +++ b/docs/en/get_started/installation.md @@ -26,6 +26,14 @@ ## Install MMEngine +:::{note} +If you only want to use the fileio, registry, and config modules in MMEngine, you can set the `MMENGINE_LITE` environment variable, which will only install the few third-party library dependencies that are necessary (e.g., it will not install opencv, matplotlib): + +```bash +MMENGINE_LITE=1 pip install mmengine +``` +::: + ### Install with mim [mim](https://github.com/open-mmlab/mim) is a package management tool for OpenMMLab projects, which can be used to install the OpenMMLab project easily. @@ -35,17 +43,10 @@ pip install -U openmim mim install mmengine ``` -If you only want to use fileio, registry and configs in MMEngine, you can install mmengine lite: - -```bash -MMENGINE_LITE=1 mim install mmengine -``` - ### Install with pip ```bash pip install mmengine -# MMENGINE_LITE=1 pip install mmengine ``` ### Use docker images @@ -71,9 +72,6 @@ pip install mmengine git clone https://github.com/open-mmlab/mmengine.git cd mmengine pip install -e . -v - -# If you only want to use fileio, registry and configs in MMEngine, you can install mmengine lite: -# MMENGINE_LITE=1 pip install -e . -v ``` ### Verify the Installation From b52c526c294ad0647b0c8d0f4f45740fd3c5031a Mon Sep 17 00:00:00 2001 From: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com> Date: Sat, 7 Oct 2023 19:16:50 +0800 Subject: [PATCH 04/12] Update installation.md --- docs/zh_cn/get_started/installation.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/docs/zh_cn/get_started/installation.md b/docs/zh_cn/get_started/installation.md index 969256f849..5ead92204e 100644 --- a/docs/zh_cn/get_started/installation.md +++ b/docs/zh_cn/get_started/installation.md @@ -26,6 +26,14 @@ ## 安装 MMEngine +:::{note} +如果你只想使用 MMEngine 中的 fileio、registry 和 config 模块,你可以设置 `MMENGINE_LITE` 环境变量,它只会安装必须的几个第三方库依赖(例如不会安装 opencv、matplotlib): + +```bash +MMENGINE_LITE=1 pip install mmengine +``` +::: + ### 使用 mim 安装 [mim](https://github.com/open-mmlab/mim) 是 OpenMMLab 项目的包管理工具,使用它可以很方便地安装 OpenMMLab 项目。 @@ -35,17 +43,10 @@ pip install -U openmim mim install mmengine ``` -如果你只想使用 MMEngine 中的 fileio、registry 和 configs,可以安装 mmengine lite: - -```bash -MMENGINE_LITE=1 mim install mmengine -``` - ### 使用 pip 安装 ```bash pip install mmengine -# MMENGINE_LITE=1 pip install mmengine ``` ### 使用 docker 镜像 @@ -71,9 +72,6 @@ pip install mmengine git clone https://github.com/open-mmlab/mmengine.git cd mmengine pip install -e . -v - -# If you only want to use fileio, registry and configs in MMEngine, you can install mmengine lite: -# MMENGINE_LITE=1 pip install -e . -v ``` ## 验证安装 From 05e8e0f55c081721ebdadf4f850086dd0026320d Mon Sep 17 00:00:00 2001 From: zhouzaida Date: Sun, 8 Oct 2023 11:54:52 +0800 Subject: [PATCH 05/12] fix lint --- docs/en/get_started/installation.md | 1 + docs/zh_cn/get_started/installation.md | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/en/get_started/installation.md b/docs/en/get_started/installation.md index 6ee0a0ab3a..4ae5e3cd7b 100644 --- a/docs/en/get_started/installation.md +++ b/docs/en/get_started/installation.md @@ -32,6 +32,7 @@ If you only want to use the fileio, registry, and config modules in MMEngine, yo ```bash MMENGINE_LITE=1 pip install mmengine ``` + ::: ### Install with mim diff --git a/docs/zh_cn/get_started/installation.md b/docs/zh_cn/get_started/installation.md index 5ead92204e..56b1ed5169 100644 --- a/docs/zh_cn/get_started/installation.md +++ b/docs/zh_cn/get_started/installation.md @@ -32,6 +32,7 @@ ```bash MMENGINE_LITE=1 pip install mmengine ``` + ::: ### 使用 mim 安装 From 750f459684f3ca525840f3fd1032dd3fec679a5c Mon Sep 17 00:00:00 2001 From: zhouzaida Date: Sun, 8 Oct 2023 14:09:40 +0800 Subject: [PATCH 06/12] update --- .circleci/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/test.yml b/.circleci/test.yml index a06794c74c..1112d3e799 100644 --- a/.circleci/test.yml +++ b/.circleci/test.yml @@ -251,7 +251,7 @@ workflows: - build_without_torch: name: build without torch requires: - - build_lite + - lint - build_cpu: name: minimum_version_cpu torch: 1.6.0 From 34bc92de7cebc6675213556b7731f8a6830a5ccc Mon Sep 17 00:00:00 2001 From: zhouzaida Date: Sun, 8 Oct 2023 14:16:17 +0800 Subject: [PATCH 07/12] update --- .circleci/test.yml | 2 +- tests/test_fileio/test_backends/test_http_backend.py | 2 +- tests/test_fileio/test_backends/test_lmdb_backend.py | 2 +- tests/test_fileio/test_backends/test_local_backend.py | 2 +- tests/test_fileio/test_backends/test_memcached_backend.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.circleci/test.yml b/.circleci/test.yml index 1112d3e799..a06794c74c 100644 --- a/.circleci/test.yml +++ b/.circleci/test.yml @@ -251,7 +251,7 @@ workflows: - build_without_torch: name: build without torch requires: - - lint + - build_lite - build_cpu: name: minimum_version_cpu torch: 1.6.0 diff --git a/tests/test_fileio/test_backends/test_http_backend.py b/tests/test_fileio/test_backends/test_http_backend.py index c69394d147..5e2ba778b3 100644 --- a/tests/test_fileio/test_backends/test_http_backend.py +++ b/tests/test_fileio/test_backends/test_http_backend.py @@ -2,13 +2,13 @@ from pathlib import Path from unittest import TestCase -import cv2 import numpy as np from mmengine.fileio.backends import HTTPBackend def imfrombytes(content): + import cv2 img_np = np.frombuffer(content, np.uint8) img = cv2.imdecode(img_np, cv2.IMREAD_COLOR) return img diff --git a/tests/test_fileio/test_backends/test_lmdb_backend.py b/tests/test_fileio/test_backends/test_lmdb_backend.py index dc2c7ded2b..4ec43437cf 100644 --- a/tests/test_fileio/test_backends/test_lmdb_backend.py +++ b/tests/test_fileio/test_backends/test_lmdb_backend.py @@ -2,7 +2,6 @@ from pathlib import Path from unittest import TestCase -import cv2 import numpy as np from parameterized import parameterized @@ -10,6 +9,7 @@ def imfrombytes(content): + import cv2 img_np = np.frombuffer(content, np.uint8) img = cv2.imdecode(img_np, cv2.IMREAD_COLOR) return img diff --git a/tests/test_fileio/test_backends/test_local_backend.py b/tests/test_fileio/test_backends/test_local_backend.py index 427ebf789a..cb0a8796c9 100644 --- a/tests/test_fileio/test_backends/test_local_backend.py +++ b/tests/test_fileio/test_backends/test_local_backend.py @@ -9,7 +9,6 @@ from unittest import TestCase from unittest.mock import patch -import cv2 import numpy as np from parameterized import parameterized @@ -17,6 +16,7 @@ def imfrombytes(content): + import cv2 img_np = np.frombuffer(content, np.uint8) img = cv2.imdecode(img_np, cv2.IMREAD_COLOR) return img diff --git a/tests/test_fileio/test_backends/test_memcached_backend.py b/tests/test_fileio/test_backends/test_memcached_backend.py index d320fcb16b..8c6acdb07f 100644 --- a/tests/test_fileio/test_backends/test_memcached_backend.py +++ b/tests/test_fileio/test_backends/test_memcached_backend.py @@ -4,7 +4,6 @@ from unittest import TestCase from unittest.mock import MagicMock, patch -import cv2 import numpy as np from parameterized import parameterized @@ -12,6 +11,7 @@ def imfrombytes(content): + import cv2 img_np = np.frombuffer(content, np.uint8) img = cv2.imdecode(img_np, cv2.IMREAD_COLOR) return img From 82036256a69f817bfe570085384f89d500d4d679 Mon Sep 17 00:00:00 2001 From: zhouzaida Date: Sun, 8 Oct 2023 14:20:19 +0800 Subject: [PATCH 08/12] update --- .circleci/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/test.yml b/.circleci/test.yml index a06794c74c..1112d3e799 100644 --- a/.circleci/test.yml +++ b/.circleci/test.yml @@ -251,7 +251,7 @@ workflows: - build_without_torch: name: build without torch requires: - - build_lite + - lint - build_cpu: name: minimum_version_cpu torch: 1.6.0 From b8f01b22756a9e9ac8526e63bae16fa6f28c8285 Mon Sep 17 00:00:00 2001 From: zhouzaida Date: Sun, 8 Oct 2023 14:30:01 +0800 Subject: [PATCH 09/12] update --- .circleci/test.yml | 2 +- tests/test_fileio/test_backends/test_http_backend.py | 2 +- tests/test_fileio/test_backends/test_lmdb_backend.py | 2 +- tests/test_fileio/test_backends/test_local_backend.py | 2 +- tests/test_fileio/test_backends/test_memcached_backend.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.circleci/test.yml b/.circleci/test.yml index 1112d3e799..71ea346c14 100644 --- a/.circleci/test.yml +++ b/.circleci/test.yml @@ -79,7 +79,7 @@ jobs: command: pip install -r requirements/tests.txt - run: name: Run unit tests - command: pytest tests/test_config tests/test_registry tests/test_fileio tests/test_logging tests/test_utils --ignore=tests/test_utils/test_dl_utils + command: pytest tests/test_config tests/test_registry tests/test_logging tests/test_utils --ignore=tests/test_utils/test_dl_utils build_cpu: parameters: diff --git a/tests/test_fileio/test_backends/test_http_backend.py b/tests/test_fileio/test_backends/test_http_backend.py index 5e2ba778b3..c69394d147 100644 --- a/tests/test_fileio/test_backends/test_http_backend.py +++ b/tests/test_fileio/test_backends/test_http_backend.py @@ -2,13 +2,13 @@ from pathlib import Path from unittest import TestCase +import cv2 import numpy as np from mmengine.fileio.backends import HTTPBackend def imfrombytes(content): - import cv2 img_np = np.frombuffer(content, np.uint8) img = cv2.imdecode(img_np, cv2.IMREAD_COLOR) return img diff --git a/tests/test_fileio/test_backends/test_lmdb_backend.py b/tests/test_fileio/test_backends/test_lmdb_backend.py index 4ec43437cf..dc2c7ded2b 100644 --- a/tests/test_fileio/test_backends/test_lmdb_backend.py +++ b/tests/test_fileio/test_backends/test_lmdb_backend.py @@ -2,6 +2,7 @@ from pathlib import Path from unittest import TestCase +import cv2 import numpy as np from parameterized import parameterized @@ -9,7 +10,6 @@ def imfrombytes(content): - import cv2 img_np = np.frombuffer(content, np.uint8) img = cv2.imdecode(img_np, cv2.IMREAD_COLOR) return img diff --git a/tests/test_fileio/test_backends/test_local_backend.py b/tests/test_fileio/test_backends/test_local_backend.py index cb0a8796c9..427ebf789a 100644 --- a/tests/test_fileio/test_backends/test_local_backend.py +++ b/tests/test_fileio/test_backends/test_local_backend.py @@ -9,6 +9,7 @@ from unittest import TestCase from unittest.mock import patch +import cv2 import numpy as np from parameterized import parameterized @@ -16,7 +17,6 @@ def imfrombytes(content): - import cv2 img_np = np.frombuffer(content, np.uint8) img = cv2.imdecode(img_np, cv2.IMREAD_COLOR) return img diff --git a/tests/test_fileio/test_backends/test_memcached_backend.py b/tests/test_fileio/test_backends/test_memcached_backend.py index 8c6acdb07f..d320fcb16b 100644 --- a/tests/test_fileio/test_backends/test_memcached_backend.py +++ b/tests/test_fileio/test_backends/test_memcached_backend.py @@ -4,6 +4,7 @@ from unittest import TestCase from unittest.mock import MagicMock, patch +import cv2 import numpy as np from parameterized import parameterized @@ -11,7 +12,6 @@ def imfrombytes(content): - import cv2 img_np = np.frombuffer(content, np.uint8) img = cv2.imdecode(img_np, cv2.IMREAD_COLOR) return img From d1fe331eb050762f39c72de13d74d15eb9319427 Mon Sep 17 00:00:00 2001 From: zhouzaida Date: Sun, 8 Oct 2023 15:53:56 +0800 Subject: [PATCH 10/12] update --- .circleci/test.yml | 2 +- requirements/tests_lite.txt | 2 ++ tests/test_logging/test_logger.py | 2 ++ tests/test_registry/test_registry.py | 8 +++----- tests/test_utils/test_misc.py | 15 +++++++++------ 5 files changed, 17 insertions(+), 12 deletions(-) create mode 100644 requirements/tests_lite.txt diff --git a/.circleci/test.yml b/.circleci/test.yml index 71ea346c14..779045ffdb 100644 --- a/.circleci/test.yml +++ b/.circleci/test.yml @@ -76,7 +76,7 @@ jobs: command: MMENGINE_LITE=1 pip install -e . -v - run: name: Install unit tests dependencies - command: pip install -r requirements/tests.txt + command: pip install -r requirements/tests_lite.txt - run: name: Run unit tests command: pytest tests/test_config tests/test_registry tests/test_logging tests/test_utils --ignore=tests/test_utils/test_dl_utils diff --git a/requirements/tests_lite.txt b/requirements/tests_lite.txt new file mode 100644 index 0000000000..c4090fd237 --- /dev/null +++ b/requirements/tests_lite.txt @@ -0,0 +1,2 @@ +parameterized +pytest diff --git a/tests/test_logging/test_logger.py b/tests/test_logging/test_logger.py index 5dd264e9e1..2ac2b3548e 100644 --- a/tests/test_logging/test_logger.py +++ b/tests/test_logging/test_logger.py @@ -11,6 +11,7 @@ from mmengine.logging import MMLogger, print_log from mmengine.logging.logger import _get_device_id +from mmengine.utils import is_installed class TestLogger: @@ -237,6 +238,7 @@ def test_file_handlers(self, tmp_path): MMLogger._instance_dict.clear() +@pytest.mark.skipif(not is_installed('torch'), reason='tests requires torch') @patch('torch.cuda.device_count', lambda: 4) def test_get_device_id(): diff --git a/tests/test_registry/test_registry.py b/tests/test_registry/test_registry.py index 6a902c5b71..eb99b3dc8e 100644 --- a/tests/test_registry/test_registry.py +++ b/tests/test_registry/test_registry.py @@ -7,7 +7,7 @@ from mmengine.config import Config, ConfigDict # type: ignore from mmengine.registry import (DefaultScope, Registry, build_from_cfg, build_model_from_cfg) -from mmengine.utils import ManagerMixin +from mmengine.utils import ManagerMixin, is_installed class TestRegistry: @@ -637,11 +637,9 @@ def __init__(self, name): Visualizer.get_current_instance() +@pytest.mark.skipif(not is_installed('torch'), reason='tests requires torch') def test_build_model_from_cfg(): - try: - import torch.nn as nn - except ImportError: - pytest.skip('require torch') + import torch.nn as nn BACKBONES = Registry('backbone', build_func=build_model_from_cfg) diff --git a/tests/test_utils/test_misc.py b/tests/test_utils/test_misc.py index 580a3f2d73..7c43d04853 100644 --- a/tests/test_utils/test_misc.py +++ b/tests/test_utils/test_misc.py @@ -4,9 +4,9 @@ import numpy as np import pytest -import torch from mmengine import MMLogger +from mmengine.utils import is_installed # yapf: disable from mmengine.utils.misc import (apply_to, concat_list, deprecated_api_warning, deprecated_function, get_object_from_string, @@ -290,7 +290,10 @@ def deprecated_demo1(): assert expected_docstring.strip(' ') == deprecated_demo1.__doc__ +@pytest.mark.skipif(not is_installed('torch'), reason='tests requires torch') def test_apply_to(): + import torch + # Test only apply `+1` to int object. data = dict(a=1, b=2.0) result = apply_to(data, lambda x: isinstance(x, int), lambda x: x + 1) @@ -332,9 +335,9 @@ def test_apply_to(): def test_locate(): assert get_object_from_string('a.b.c') is None - model_module = import_module('mmengine.model') - assert get_object_from_string('mmengine.model') is model_module + config_module = import_module('mmengine.config') + assert get_object_from_string('mmengine.config') is config_module assert get_object_from_string( - 'mmengine.model.BaseModel') is model_module.BaseModel - assert get_object_from_string('mmengine.model.BaseModel.forward') is \ - model_module.BaseModel.forward + 'mmengine.config.Config') is config_module.Config + assert get_object_from_string('mmengine.config.Config.fromfile') is \ + config_module.Config.fromfile From 70e0e6f9def6a4977aa87b1b2a628a0326f4ee6f Mon Sep 17 00:00:00 2001 From: zhouzaida Date: Sun, 8 Oct 2023 16:12:01 +0800 Subject: [PATCH 11/12] update --- .circleci/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/test.yml b/.circleci/test.yml index 779045ffdb..78f8da28a9 100644 --- a/.circleci/test.yml +++ b/.circleci/test.yml @@ -49,7 +49,7 @@ jobs: command: pip install -e . -v - run: name: Install unit tests dependencies - command: pip install -r requirements/tests.txt + command: pip install -r requirements/tests_lite.txt - run: name: Run unit tests command: pytest tests/test_config tests/test_registry tests/test_fileio tests/test_logging tests/test_utils --ignore=tests/test_utils/test_dl_utils From 8d63e7ef9683f811217ad687d7c974cdf816f976 Mon Sep 17 00:00:00 2001 From: zhouzaida Date: Sun, 8 Oct 2023 16:17:30 +0800 Subject: [PATCH 12/12] update --- requirements/tests_lite.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements/tests_lite.txt b/requirements/tests_lite.txt index c4090fd237..9e8922d300 100644 --- a/requirements/tests_lite.txt +++ b/requirements/tests_lite.txt @@ -1,2 +1,3 @@ +lmdb parameterized pytest