Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not sure if my training is working. No window opens. #7

Open
harbarex opened this issue Aug 15, 2020 · 6 comments
Open

Not sure if my training is working. No window opens. #7

harbarex opened this issue Aug 15, 2020 · 6 comments

Comments

@harbarex
Copy link

I was trying to run the command rex-gym train --playground True --env walk --log-dir "trainLogs" but I only get the following screen:
image

What am I doing wrong? I am using Windows, and I installed the packages from source.

@nicrusso7
Copy link
Owner

Hi, thanks for raising this issue. This library is not properly tested on Windows, I’ll try to reproduce this issue ASAP. Thanks!

@nicrusso7 nicrusso7 added windows-support bug Something isn't working labels Aug 15, 2020
@harbarex
Copy link
Author

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

@nicrusso7
Copy link
Owner

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.

@iftikarmuhammad
Copy link

iftikarmuhammad commented Sep 22, 2020

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.

envproc
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?

@nicrusso7
Copy link
Owner

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.

@nicrusso7
Copy link
Owner

I've just pushed a hotfix for this, it should force single process now on Windows (please install from source for now).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants