Skip to content

Commit

Permalink
limit the max version of MMCV, MMDet, MMCls (#614)
Browse files Browse the repository at this point in the history
  • Loading branch information
GT9505 authored Jul 15, 2022
1 parent 3cbd350 commit 79f8e19
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
12 changes: 7 additions & 5 deletions mmtrack/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
from .version import __version__, version_info

MMCV_MIN = '1.3.17'
MMCV_MAX = '1.6.0'
MMCV_MAX = '1.7.0'

MMDET_MIN = '2.19.1'
MMDET_MAX = '3.0.0'


def digit_version(version_str: str, length: int = 4):
Expand Down Expand Up @@ -58,16 +59,17 @@ def digit_version(version_str: str, length: int = 4):
mmcv_version = digit_version(mmcv.__version__)


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

mmdet_min_version = digit_version(MMDET_MIN)
mmdet_max_version = digit_version(MMDET_MAX)
mmdet_version = digit_version(mmdet.__version__)


assert (mmdet_min_version <= mmdet_version), \
assert (mmdet_min_version <= mmdet_version < mmdet_max_version), \
f'MMDet=={mmdet.__version__} is used but incompatible. ' \
f'Please install mmdet>={MMDET_MIN}.'
f'Please install mmdet>={MMDET_MIN}, <{MMDET_MAX}.'

__all__ = ['__version__', 'version_info', 'digit_version']
4 changes: 2 additions & 2 deletions requirements/mminstall.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
mmcls>=0.16.0
mmcv-full>=1.3.17,<1.6.0
mmcls>=0.16.0,<1.0.0
mmcv-full>=1.3.17,<1.7.0
mmdet>=2.19.1,<3.0.0
4 changes: 2 additions & 2 deletions requirements/runtime.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ attributee==0.1.5
dotty_dict
lap
matplotlib
mmcls>=0.16.0
mmcls>=0.16.0,<1.0.0
motmetrics
packaging
pandas<=1.3.5
pycocotools<=2.0.2
pycocotools
scipy<=1.7.3
seaborn
terminaltables
Expand Down

0 comments on commit 79f8e19

Please sign in to comment.