linyiLYi / snake-ai

An AI agent that beats the classic game "Snake".
Apache License 2.0
1.59k stars 352 forks source link

运行train_cnn出现多线程错误 #30

Open Drunk-Youth opened 9 months ago

Drunk-Youth commented 9 months ago

第29行 model = MaskablePPO.load(MODEL_PATH)

发生异常: EOFError [WinError 109] 管道已结束。 BrokenPipeError: [WinError 109] 管道已结束。

During handling of the above exception, another exception occurred:

File "C:\Users\Administrator\Desktop\snake-ai-master\main\train_cnn.py", line 53, in main env = SubprocVecEnv([make_env(seed=s) for s in seed_set]) File "C:\Users\Administrator\Desktop\snake-ai-master\main\train_cnn.py", line 119, in main() EOFError:

boboqun commented 9 months ago

OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES 可以尝试添加这行运行指令,虽然不知道为什么,但是我是加了这行以后能正常跑起来的。