__init__.py 1.0 KB

123456789101112131415161718192021222324252627
  1. # Copyright (c) OpenMMLab. All rights reserved.
  2. import mmcv
  3. import mmengine
  4. from mmengine.utils import digit_version
  5. from .version import __version__, version_info
  6. mmcv_minimum_version = '2.0.0rc4'
  7. mmcv_maximum_version = '2.1.0'
  8. mmcv_version = digit_version(mmcv.__version__)
  9. mmengine_minimum_version = '0.7.1'
  10. mmengine_maximum_version = '1.0.0'
  11. mmengine_version = digit_version(mmengine.__version__)
  12. assert (mmcv_version >= digit_version(mmcv_minimum_version)
  13. and mmcv_version < digit_version(mmcv_maximum_version)), \
  14. f'MMCV=={mmcv.__version__} is used but incompatible. ' \
  15. f'Please install mmcv>={mmcv_minimum_version}, <{mmcv_maximum_version}.'
  16. assert (mmengine_version >= digit_version(mmengine_minimum_version)
  17. and mmengine_version < digit_version(mmengine_maximum_version)), \
  18. f'MMEngine=={mmengine.__version__} is used but incompatible. ' \
  19. f'Please install mmengine>={mmengine_minimum_version}, ' \
  20. f'<{mmengine_maximum_version}.'
  21. __all__ = ['__version__', 'version_info', 'digit_version']