ElegantRL icon indicating copy to clipboard operation
ElegantRL copied to clipboard

🐛 Fix bug: mp.set_start_method, forkserver for Linux, and spawn for WinOS

Open Yonv1943 opened this issue 2 years ago • 0 comments
trafficstars

https://github.com/AI4Finance-Foundation/ElegantRL/blob/3721f6e677ea5a2720be23bbb18855a2f06767d7/elegantrl/train/run.py#L99

In order to be compatible with the WinOS system, it needs to make this change:

    method = 'spawn' if os.name == 'nt' else 'forkserver'  # os.name == 'nt' means Windows NT operating system (WinOS)
    mp.set_start_method(method=method, force=True)

Yonv1943 avatar Feb 02 '23 09:02 Yonv1943