grok-1 icon indicating copy to clipboard operation
grok-1 copied to clipboard

I have an exception where the file does not exist and the same file is accessed at the same time

Open xhzwjc opened this issue 1 year ago • 4 comments

INFO:rank:Loading checkpoint at ./checkpoints/ckpt-0 Traceback (most recent call last): File "C:\Users\w2983\Desktop\grok-1\checkpoint.py", line 52, in copy_to_shm shutil.copyfile(file, tmp_path) File "C:\Users\w2983\AppData\Local\Programs\Python\Python39\lib\shutil.py", line 264, in copyfile with open(src, 'rb') as fsrc: FileNotFoundError: [Errno 2] No such file or directory: './checkpoints/ckpt-0\tensor00000_000'

File "C:\Users\w2983\Desktop\grok-1\checkpoint.py", line 55, in copy_to_shm os.remove(tmp_path) PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: '\dev\shm\tmpri0li3ul'

xhzwjc avatar Mar 18 '24 07:03 xhzwjc

I have tried some methods, but still can't solve this problem, my brain is dying recently

xhzwjc avatar Mar 18 '24 07:03 xhzwjc

@ibab @jaimealonso @madaan @chentingpc

xhzwjc avatar Mar 18 '24 08:03 xhzwjc

@xhzwjc surround it with try except block ... issue is where file is not closed and python code wants to delete that temp file.

yarodevuci avatar Mar 18 '24 22:03 yarodevuci

@yarodevuci I have adopted

xhzwjc avatar Mar 21 '24 06:03 xhzwjc