xai-org / grok-1

Grok open release
Apache License 2.0
49.5k stars 8.32k forks source link

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

Open xhzwjc opened 7 months ago

xhzwjc commented 7 months ago

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 commented 7 months ago

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

xhzwjc commented 7 months ago

@ibab @jaimealonso @madaan @chentingpc

yarodevuci commented 7 months ago

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

xhzwjc commented 7 months ago

@yarodevuci I have adopted