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
[RLlib] When using gym.spaces.Dict
as observation_space
the method export_model()
breaks
#26782
Comments
I know about this issue: #26593 of a co-worker. It seems totally different, but the issue there also (only) occurs when using a Because of that issue I tried setting Then, for both cases (
Why this does not solve my problemIt is good to mention, I need to set |
gym.spaces.Dict
as observation_space export_model
breaksgym.spaces.Dict
as observation_space
the method export_model()
breaks
To summarize, the problem occurs when using both:
|
I have looked into the issue and it is rooted in |
Hi @kouroshHakha , Why we cannot use Best solution? Our temporary solution: I have a work around, which is working but I don't think it is great. I'm afraid this is going to cause a lot of maintaining issues and may break with future versions of Ray and different models/architectures. It may be hard to generalize this solution. It may provide a hint however for you? A feasible general solution?
From my observation the So maybe the solution is simple? |
Hello, Iam also using my obs space as dict, however I dont understand how can I custom my model . Knowing that Iam using DDPG. Would anybody please give me some hint? Thank you |
What happened + What you expected to happen
When I create a custom Environment which has a
gym.spaces.Dict
asobservation_space
, I cannot export the model to TorchScript.For this I use:
See below for full code to reproduce the issue.
When running it, I get the following error:
I also included (commented) code lines to use a
gym.spaces.Box
asobservation_space
. In the comments is which lines you have to comment+uncomment to switch. Then, you can see the issue no longer occurs.Versions / Dependencies
Python v3.9.12
pip install Ray==1.13.0
pip install Ray[tune]==1.13.0
pip install Ray[rllib]==1.13.0
Reproduction script
Issue Severity
High: It blocks me from completing my task.
The text was updated successfully, but these errors were encountered: