-
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
Set Attributes in Vector Environments #473
Comments
Yes
I took a look at previous issues and find nothing, so probably no
Sure, and don't forget to add unit tests :) |
I have been thinking about implementing
I can't see any better way to do it and this is quite unintuitive and ugly. |
This is same as SB3's approaches: I'm ok with it. |
Operating System: Ubuntu Linux; Version: Commit c198761
Hey,
I am using tianshou as a submodule in a different project. There I use
ShmemVectorEnv
to simulate an environment. During training I would like to dynamically manipulate the environments by setting certain attributes to some values. Looking at the current code, this operation does not seem to be supported by the vector environments, is that correct? Is there some reason whyBaseVectorEnv
and the workers cannot implement a__setattr__
method?Is there possibly some other solution to this problem or could such methods be implemented (I'd be happy to have a crack at it and raise a pull request)? Although I have not yet performed any benchmarks, I expect the cost of instantiating a new
ShmemVectorEnv
whenever I want to modify an attribute to be prohibitive.Thanks for your help!
Best,
Markus
The text was updated successfully, but these errors were encountered: