Move normalization to policy for act and diffusion#90
Merged
Conversation
Comment on lines
72
to
79
| # Normalization / Unnormalization | ||
| normalize_input_modes: dict[str, str] = { | ||
| "observation.image": "mean_std", | ||
| "observation.state": "min_max", | ||
| } | ||
| unnormalize_output_modes: dict[str, str] = { | ||
| "action": "min_max", | ||
| } |
Contributor
There was a problem hiding this comment.
alexander-soare
suggested changes
Apr 22, 2024
Contributor
alexander-soare
left a comment
There was a problem hiding this comment.
@Cadene nice! This makes things a lot cleaner. I'm in agreement with your approach and have left some minor passing comments. Looking forward to reviewing the final PR.
Base automatically changed from
user/rcadene/2024_04_18_episode_data_index
to
main
April 23, 2024 12:13
cf45d92 to
42ed7bb
Compare
alexander-soare
suggested changes
Apr 24, 2024
Contributor
alexander-soare
left a comment
There was a problem hiding this comment.
Thanks a lot for this PR Remi. Super clean design. I left some comments, and I think for some it might make sense for me to contribute to the PR a bit.
| """ | ||
|
|
||
| # Environment. | ||
| # TODO(rcadene, alexander-soar): remove these as they are defined in input_shapes, output_shapes |
Contributor
There was a problem hiding this comment.
note to self so I don't forget. I will contribute to this PR to do this now
alexander-soare
approved these changes
Apr 25, 2024
Contributor
alexander-soare
left a comment
There was a problem hiding this comment.
Approved after you merge my PR
menhguin
pushed a commit
to menhguin/lerobot
that referenced
this pull request
Feb 9, 2025
Co-authored-by: Alexander Soare <[email protected]>
Kalcy-U
referenced
this pull request
in Kalcy-U/lerobot
May 13, 2025
Co-authored-by: Alexander Soare <[email protected]>
ZoreAnuj
pushed a commit
to luckyrobots/lerobot
that referenced
this pull request
Jul 29, 2025
Co-authored-by: Alexander Soare <[email protected]>
Ricci084
pushed a commit
to JeffWang987/lerobot
that referenced
this pull request
Sep 5, 2025
Co-authored-by: Alexander Soare <[email protected]>
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.
What does this PR do?
stats.pthdataset_statsargument to policiesdataset_stats=dataset.statsdataset_stats=Nonesince the stats are insidepolicy.state_dict()transformdatasets/factory.pyenvs/utils.pytransforms.pyinput_shapes,output_shapes,normalize_input_modes,unnormalize_output_modesin config yaml andconfiguration_POLICY.pyinput_shapesandoutput_shapescan also be used to instantiate thenn.Moduleof the policy, but I left this for future PRpolicies/normalize.pycontainingNormalizeandUnnormalize, which arenn.Moduleof the policytest_policies.py::test_normalizeHow was it tested?
CI + breakpoint