Open namheegordonkim opened 2 years ago
Yes, this is confusing. Info
is a struct returned by the brax physics step containing extra metadata (mainly impulses). But it's ALSO extra metadata used by env wrappers for book-keeping. And on top of that, you noticed a useless line in hopper that is probably left over from a refactor. You're right, we're fetching info
in hopper and then doing nothing with it. I'll make a note to delete that line.
This will probably become less confusing when we migrate environments out of Brax, then the term 'Info' will be less ambiguous because their two usages will be more separate.
It seems that the class
State
definesinfo
as a dictionary, and env wrappers are getting away treating it as such:e.g. https://github.com/google/brax/blob/a09f3e75390c1ff017565ba2acfa77e838535fd3/brax/envs/wrappers.py#L67
However, default environments use
self.sys.info
to get anInfo
class object, but it's dumped in favour of creating a completely empty dictionary. e.g. https://github.com/google/brax/blob/a09f3e75390c1ff017565ba2acfa77e838535fd3/brax/envs/hopper.py#L81So if I'm reading this right, the
State.info
is not supposed to be coming fromself.sys.info
? In which case,self.sys.info
will never be returned as part ofState
. Is this intentional?