-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Question: Is there an easy way to modify tianshou to support vector Env with different state sizes? #351
Comments
Could you please provide the example script so that I can have a test? |
Hi, I write an example as follow to illustrate my question:
Thank you! |
Hi, #352 works for the venv obs issue. But there will be another exception after converting numpy arrays with different shapes to np.object (https://github.com/thu-ml/tianshou/blob/master/tianshou/data/collector.py#L118). You can test it via this code:
Thank you! |
How about now? |
Yes, it works now. Thank you very much for your effort on my question! |
Hi, thank you for this great library.
I have a question about the vector Env. The shape of my customized Env's state depends on its size. For example,
Env(size=n)
will returnnx.Graph()
with n nodes as its state. However, when I create vector Env with different nodes num, it will raise an error since states with different sizes cannot be stacked (at https://github.com/thu-ml/tianshou/blob/master/tianshou/env/venvs.py#L166). And it seems that the Batch class does not support states with different sizes either.So, is there an easy way to make the vector Env collect states with different sizes?
Thank you very much!
The text was updated successfully, but these errors were encountered: