Fix three bugs: missing raise, wrong RND broadcast index, variable typo#180
Merged
ClemensSchwarke merged 1 commit intoleggedrobotics:mainfrom Feb 25, 2026
Conversation
1. rnn.py: Add missing `raise` before NotImplementedError -- the exception was being constructed but never raised, causing silent failure when resetting hidden state of done environments with a custom hidden state. 2. ppo.py: Fix wrong index in broadcast_parameters -- when RND is enabled, the predictor was loading model_params[1] (critic state) instead of model_params[2] (its own state), corrupting RND weights during multi-GPU training. 3. cnn_model.py: Fix variable name typo `latend_cnn` -> `latent_cnn`.
ClemensSchwarke
approved these changes
Feb 25, 2026
Collaborator
ClemensSchwarke
left a comment
There was a problem hiding this comment.
Thanks a lot @jashshah999 :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes three independent bugs found during code review:
rnn.py:NotImplementedErroris constructed but never raised inRNN.reset(), causing silent failure when resetting hidden state of done environments with a custom hidden stateppo.py:broadcast_parameters()loadsmodel_params[1](critic state) into the RND predictor instead ofmodel_params[2](its own state), corrupting RND weights during multi-GPU distributed trainingcnn_model.py: Variable name typolatend_cnn->latent_cnninCNNModel.get_latent()Changes
All three fixes are minimal and self-contained:
raisekeyword beforeNotImplementedError(...)inrnn.py:65model_params[1]tomodel_params[2]inppo.py:516latend_cnntolatent_cnnincnn_model.py:122-124Test plan