rex-gym
rex-gym copied to clipboard
Not sure if my training is working. No window opens.
I was trying to run the command rex-gym train --playground True --env walk --log-dir "trainLogs"
but I only get the following screen:
What am I doing wrong? I am using Windows, and I installed the packages from source.
Hi, thanks for raising this issue. This library is not properly tested on Windows, I’ll try to reproduce this issue ASAP. Thanks!
I tried to find out where exactly the script was getting stuck, and found that this was the traceback obtained with a Keyboard Interrupt, no matter how much time elapsed:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\programdata\anaconda3\envs\anymal\lib\multiprocessing\spawn.py", line 105, in spawn_main
exitcode = _main(fd)
File "c:\programdata\anaconda3\envs\anymal\lib\multiprocessing\spawn.py", line 113, in _main
preparation_data = reduction.pickle.load(from_parent)
KeyboardInterrupt
Kindly let me know what I can do in this case
It seems pickling issue in multiprocessing on windows. Unfortunately this library isn't supporting Windows at the moment. I will release a docker image in the near future, but for now I'd recommend to run it on Linux or Mac machines. Sorry for the inconvenience.
Hello guys I've suffered from the same issue here. I tested this library on Linux and it just work perfectly, however for some reason I need to get the library working on Windows OS.
As for windows support I found the policy player working quite nicely (since it's not using multiprocessing) and as for the trainer it will work if we set env_processes parameter on _train function inside rex_gym/playground/trainer.py to False since this will avoid the use of multiprocessing.
source : rex_gym/agents/scripts/utility.py
@nicrusso7 may I ask what is the downside of not using the wrappers.ExternalProcess on this library? And will multiple agents still can be used without the wrappers?
Hi @iftikarmuhammad, the wrappers.ExternalProcess
creates a new process for each agent (for lock free parallelism) meanwhile in the else statement, all the agents are created in the same process. This means that using ExternalProcess
, the agents are executed in parallel speeding up the full process (batch simulation) itself.
As a temporarily workaround, I could actually force this mode when running on Windows. Thanks for pointing this out.
I've just pushed a hotfix for this, it should force single process now on Windows (please install from source for now).