Skip to content

Property inheritence for a custom environment when wrapped as TransformedEnv #2522

Answered by vmoens
MorganCThomas asked this question in Q&A
Discussion options

You must be logged in to vote

Hey thanks for posting this.
I see what the issue is but it's going to be hard to fix consistently, maybe the best would be to provide some doc regarding what can and can't be done and how to do fancy stuff without breaking the class.

This are indeed sort of "meant to be like this". You've probably realized by now that TransformedEnv is rather complex, because it needs to do a lot of things during step: call the inverse transform, execute the base_env._step, make some quality checks, execute the forward transforms, aggregate done states etc.
During reset, for some transforms we need to know what the input tensordict was (remember that _reset signature takes a tensordict as input too), so …

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@MorganCThomas
Comment options

@vmoens
Comment options

@MorganCThomas
Comment options

Answer selected by MorganCThomas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants