Altering body measurements on fly (i.e. in state) #232
Replies: 5 comments
-
@erikfrey do you have any thoughts on this? |
Beta Was this translation helpful? Give feedback.
-
Hi @peabody124 ! Thanks for using brax :D This is similar to the discussion on #229 (comment) where modifying params in the System (without having to re-jit) can be done via an experimental wrapper, as is done in https://github.com/google/brax/blob/main/brax/experimental/tracing/wrappers.py In the next major version of brax, the System will be traceable by design, so tracing over environment settings should be a bit easier to handle. Hope this helps somewhat for now! |
Beta Was this translation helpful? Give feedback.
-
Thank you! @btaba I'll try it out. It appears much more elegant than my current approach having to overload the system and implementation of joints to take in additional parameters. |
Beta Was this translation helpful? Give feedback.
-
@btaba thanks for that pointer. I managed to get it running ... somewhat. However, in my case I'm trying to have the environment modified over a continuous set of variables that are also being learned (yay differentiable simulator!). I adapted the DynamicWrapper to handle this but find that the memory usage blows up massively. For example things that were running on an A100 now request 350GB of GPU ram. Is this to be expected? A much uglier approach that passes these scaling parameters to the physics engine runs without such an additional overhead.
|
Beta Was this translation helpful? Give feedback.
-
I also opened an issue about the TracedConfig not influencing the renderer #265 |
Beta Was this translation helpful? Give feedback.
-
Love brax! Thanks for all your work. The ability to run billions of sim steps in 30 minutes is amazing.
I am really hoping to find a way to change some of the body parameters on the fly. For example, to alter limb segment lengths in the reset function and store that information as an augmented part of the state. From my reading, all that information if bound up in System, which is expected to be static during training and inference.
Is this something that is feasible with brax, or is it complete antithetical to the design decisions? I can imagine ways to implement this for very specific a specific env that uses a custom superclass of System that pulls in the appropriate information from the state for each step, but am worried it might ultimately require overriding all of the forces/actuators/etc to keep the implementation "pure".
(p.s. if this is something that could be cleanly implemented in a general way, I'd be happy to work on a PR)
Beta Was this translation helpful? Give feedback.
All reactions