Repository navigation
Replies: 4 comments
|
The resetting problem has been solved. |
0 replies
|
You could probably use cache. https://docs.jax.dev/en/latest/persistent_compilation_cache.html |
0 replies
It seems that complied was trigger every single time the reset() is called, even I have used this cache method. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Issue: Clarification on Environment Reset Behavior and Optimization for Debugging
Hello,
I'm working with the
mujoco_playgroundand have a question regarding how the environment'sresetfunction is called within theOnPolicyRunner, especially when an environment finishes an episode (i.e., whendonebecomes 1).Environment Reset Behavior
I've observed that in the provided examples, the
resetfunction within the environment is used by theOnPolicyRunner. I'm trying to understand at what specific point thisresetis invoked by the runner.My current understanding is that when an environment's
stepfunction outputsdone = 1, the environment should then be reset for the next episode. Could you please clarify if this is indeed how it works withinOnPolicyRunner?To debug and confirm environment resets, I added a
jax.debug.printstatement within my custom environment'sresetmethod, like so:However, the
--- RESET FINISHED ---message only appears once at the very beginning of the terminal output. It stops appearing after the initial log information starts to show. How can I reliably confirm thatmujoco_playgroundis successfully resetting the environment according to my code's logic, especially whendoneis triggered during an episode?Reducing Initialization Time for Development
Additionally, I've noticed that the time from running the script to actually seeing the first log information in the terminal is quite long. I suspect this is due to JAX's JIT (Just-In-Time) compilation process.
This long initialization time makes it difficult to quickly test minor adjustments to the environment and verify if the overall pipeline works as expected. Are there any effective methods or best practices to significantly reduce this initial setup time, especially for rapid prototyping and debugging when making small changes to the environment?
Any insights or guidance on these two points would be greatly appreciated!
All reactions