collect_env.py 718 Bytes
Newer Older
dingchang's avatar
dingchang committed
1
# Copyright (c) OpenMMLab. All rights reserved.
2
3
from mmcv.utils import collect_env as collect_base_env
from mmcv.utils import get_git_hash
zhangwenwei's avatar
zhangwenwei committed
4
5

import mmdet
6
import mmdet3d
7
import mmseg
zhangwenwei's avatar
zhangwenwei committed
8
9
10


def collect_env():
11
12
    """Collect the information of the running environments."""
    env_info = collect_base_env()
13
    env_info['MMDetection'] = mmdet.__version__
14
    env_info['MMSegmentation'] = mmseg.__version__
15
    env_info['MMDetection3D'] = mmdet3d.__version__ + '+' + get_git_hash()[:7]
zhangshilong's avatar
zhangshilong committed
16
    from mmdet3d.models.layers.spconv import IS_SPCONV2_AVAILABLE
VVsssssk's avatar
VVsssssk committed
17
    env_info['spconv2.0'] = IS_SPCONV2_AVAILABLE
zhangshilong's avatar
zhangshilong committed
18

zhangwenwei's avatar
zhangwenwei committed
19
20
21
22
23
    return env_info


if __name__ == '__main__':
    for name, val in collect_env().items():
24
        print(f'{name}: {val}')