ElegantRL
ElegantRL copied to clipboard
🐛 Fix bug: mp.set_start_method, forkserver for Linux, and spawn for WinOS
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)