collect_env.py 603 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
16
    env_info['MMDetection3D'] = mmdet3d.__version__ + '+' + get_git_hash()[:7]

zhangwenwei's avatar
zhangwenwei committed
17
18
19
20
21
    return env_info


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