Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make mmseg to be able to run on mmcv=2.2.0 #3663

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions mmseg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,23 @@ def digit_version(version_str: str, length: int = 4):
mmcv_version = digit_version(mmcv.__version__)


assert (mmcv_min_version <= mmcv_version < mmcv_max_version), \
rabinadk1 marked this conversation as resolved.
Show resolved Hide resolved
assert (mmcv_version >= mmcv_min_version), \
f'MMCV=={mmcv.__version__} is used but incompatible. ' \
f'Please install mmcv>=2.0.0rc4.'
f'Please install mmcv>={MMCV_MIN}.'

assert (mmcv_version <= mmcv_max_version), \
f'MMCV=={mmcv.__version__} is used but incompatible. ' \
f'Please install mmcv<{MMCV_MAX}.'

mmengine_min_version = digit_version(MMENGINE_MIN)
mmengine_max_version = digit_version(MMENGINE_MAX)
mmengine_version = digit_version(mmengine.__version__)

assert (mmengine_min_version <= mmengine_version < mmengine_max_version), \
assert (mmengine_version >= mmengine_min_version), \
f'MMEngine=={mmengine.__version__} is used but incompatible. ' \
f'Please install mmengine>={mmengine_min_version}, '\
f'<{mmengine_max_version}.'
f'Please install mmengine>={MMENGINE_MIN}.'

assert (mmengine_version < mmengine_max_version), \
f'MMEngine=={mmengine.__version__} is used but incompatible. ' \
f'Please install mmengine<{MMENGINE_MAX}.'
__all__ = ['__version__', 'version_info', 'digit_version']