fastnlp / fitlog

fitlog是一款在深度学习训练中用于辅助用户记录日志和管理代码的工具
https://gitee.com/fastnlp/fitlog
Apache License 2.0
1.48k stars 130 forks source link

在已存在的git仓库内部, 执行fitlog init 会报错 #25

Closed zhouxiaowei1120 closed 4 years ago

zhouxiaowei1120 commented 4 years ago

在已存在的git仓库内部, 执行fitlog init 会报错。提示如下:

`$ fitlog init Traceback (most recent call last): File "/Users/zhou/miniconda3/lib/python3.7/shutil.py", line 566, in move os.rename(src, real_dst) FileNotFoundError: [Errno 2] No such file or directory: '/Users/zhou/example/.fitlog' -> '/Users/zhou/example/.git'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/zhou/miniconda3/bin/fitlog", line 8, in sys.exit(main_cmd()) File "/Users/zhou/miniconda3/lib/python3.7/site-packages/fitlog/fastcmd/init.py", line 49, in main_cmd cmd_mapcmd File "/Users/zhou/miniconda3/lib/python3.7/site-packages/fitlog/fastcmd/init_cmd.py", line 26, in init_cmd committer.init_project(name, hide=args["--hide"], git=not args["--no-git"]) File "/Users/zhou/miniconda3/lib/python3.7/site-packages/fitlog/fastgit/committer.py", line 496, in init_project self._switch_to_fast_git(pj_path) File "/Users/zhou/miniconda3/lib/python3.7/site-packages/fitlog/fastgit/committer.py", line 167, in _switch_to_fast_git shutil.move(fitlog_path, git_path) File "/Users/zhou/miniconda3/lib/python3.7/shutil.py", line 580, in move copy_function(src, real_dst) File "/Users/zhou/miniconda3/lib/python3.7/shutil.py", line 266, in copy2 copyfile(src, dst, follow_symlinks=follow_symlinks) File "/Users/zhou/miniconda3/lib/python3.7/shutil.py", line 120, in copyfile with open(src, 'rb') as fsrc: FileNotFoundError: [Errno 2] No such file or directory: '/Users/zhou/example/.fitlog'`

希望能修复。十分感谢!

yhcc commented 4 years ago

好的,我们看下

WillQvQ commented 4 years ago

感谢您的反馈,您所发现的bug已经在最新版本中修复。