Commit 2cace49f authored by Yuxin Wu's avatar Yuxin Wu

fix #715

parent d4799335
...@@ -23,7 +23,7 @@ because the bottleneck in this implementation is not computation but simulation. ...@@ -23,7 +23,7 @@ because the bottleneck in this implementation is not computation but simulation.
Some practicical notes: Some practicical notes:
1. Prefer Python 3. 1. Prefer Python 3; Windows not supported.
2. Occasionally, processes may not get terminated completely. It is suggested to use `systemd-run` to run any 2. Occasionally, processes may not get terminated completely. It is suggested to use `systemd-run` to run any
multiprocess Python program to get a cgroup dedicated for the task. multiprocess Python program to get a cgroup dedicated for the task.
3. Training with a significant slower speed (e.g. on CPU) will result in very bad score, probably because of the slightly off-policy implementation. 3. Training with a significant slower speed (e.g. on CPU) will result in very bad score, probably because of the slightly off-policy implementation.
......
...@@ -231,8 +231,9 @@ def train(): ...@@ -231,8 +231,9 @@ def train():
# setup simulator processes # setup simulator processes
name_base = str(uuid.uuid1())[:6] name_base = str(uuid.uuid1())[:6]
namec2s = 'ipc://@sim-c2s-{}'.format(name_base) prefix = '@' if sys.platform.startswith('linux') else ''
names2c = 'ipc://@sim-s2c-{}'.format(name_base) namec2s = 'ipc://{}sim-c2s-{}'.format(prefix, name_base)
names2c = 'ipc://{}sim-s2c-{}'.format(prefix, name_base)
procs = [MySimulatorWorker(k, namec2s, names2c) for k in range(SIMULATOR_PROC)] procs = [MySimulatorWorker(k, namec2s, names2c) for k in range(SIMULATOR_PROC)]
ensure_proc_terminate(procs) ensure_proc_terminate(procs)
start_proc_mask_signal(procs) start_proc_mask_signal(procs)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment