fix policy normalization migration keys #2353
Open
+33
−11
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.
What this does
Noticed a critical bug in the policy migration which introduced severe regressions in policy performance.
When the camera name of the robot contains
_, line 112feature_name = ".".join(parts[:-1]).replace("_", ".")inmigrate_policy_normalization.pyused to convert it every_to.. Due to which thenormalize_processorwhile normalizing the input images won't be able to find the camera key and return the tensor without normalization at line 307 innormalize_processor.pyduring policy execution.Fix:
_handling when there are multiple parts to the feature name inmigrate_policy_normalization.py.normalize_processor.pyto raise error if policy is missing keys and updated its test.How it was tested
test_quantile_with_missing_statsintest_normalize_processor.pyHow to checkout & try? (for the reviewer)
Provide a simple way for the reviewer to try out your changes.
_in it.