mmdetection
mmdetection copied to clipboard
fatal: not a git repository when saving checkpoints
Prerequisite
- [X] I have searched the existing and past issues but cannot get the expected help.
- [X] I have read the FAQ documentation but cannot get the expected help.
- [X] The bug has not been fixed in the latest version.
🐞 Describe the bug
Whenever a checkpoint is saved, I get additional git messages:
09/16 14:47:35 - mmengine - INFO - Saving checkpoint at 9 epochs
fatal: not a git repository (or any parent up to mount point /opt/ml)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
I'm not sure why these messages appear or how to remove them.
Environment
git clone https://github.com/open-mmlab/mmdetection.git -b 3.x
cd mmdetection
python mmdet/utils/collect_env.py
Appears to be bug in collect env:
root@3deae1c5c230:~/mmdetection# python -V
Python 3.8.13
root@3deae1c5c230:~/mmdetection# python mmdet/utils/collect_env.py
Traceback (most recent call last):
File "mmdet/utils/collect_env.py", line 2, in <module>
from mmengine.utils import get_git_hash
File "/opt/conda/lib/python3.8/site-packages/mmengine/__init__.py", line 3, in <module>
from .config import *
File "/opt/conda/lib/python3.8/site-packages/mmengine/config/__init__.py", line 2, in <module>
from .config import Config, ConfigDict, DictAction
File "/opt/conda/lib/python3.8/site-packages/mmengine/config/config.py", line 15, in <module>
from typing import Any, Optional, Sequence, Tuple, Union
File "/root/mmdetection/mmdet/utils/typing.py", line 3, in <module>
from typing import List, Optional, Sequence, Tuple, Union
ImportError: cannot import name 'List' from partially initialized module 'typing' (most likely due to a circular import) (/root/mmdetection/mmdet/utils/typing.py)
Additional information
I changed the logger to:
log_config = dict( # config to register logger hook
interval=50, # Interval to print the log
hooks=[
dict(type='TextLoggerHook'),
dict(type='TensorboardLoggerHook', log_dir='/opt/ml/checkpoints')
]
)
and set work-dir
to /opt/ml/checkpoints