-
Notifications
You must be signed in to change notification settings - Fork 24
Rework how we handle sections in the parameter transform. #790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Conversation
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
Contributor
Differential Revision: D86350961
facebook-github-bot
pushed a commit
that referenced
this pull request
Nov 7, 2025
Summary: After D86041361 landed, we suddenly started getting a ton of warnings of the format: [MOMENTUM][WARNING]: Invalid line under [ParameterSets] section; ignoring limit b_l_pinky3_rz minmax [-0.1, 1.57] This was because we suddenly started flagging when we saw something in the parameter sets section that didn't look like a parameterset. This is IMO a good change to make, but it causes problems with the current parser. It basically just runs all the parsers (parameter sets, parameter transform, parameter limits) over the entire file, basically ignoring the sections. Thus, when the parametersets parser sees a line that looks like a parameter limit, it issues a warning. One fix would be to just back out that change. However, I do think the current approach is not ideal, because it means we have to constantly update all the parsers to ignore stuff from the other parsers, which is potentially error-prone. Instead, I'm suggesting going ahead and breaking the document up into sections in a pre-process. Then for each section we can parse just that section. This turned out to be a little trickier than I expected, however, because in D86041361 we also added the ability to have the same section appear more than once in the file. We could just glue them together, but this screws up line numbers (used for better error messages). Therefore I'm introducing a new glass that appends all the sections _implicitly_, keeping tracking of the start/end line numbers for each. Reviewed By: jeongseok-meta, cstollmeta Differential Revision: D86348623
facebook-github-bot
pushed a commit
that referenced
this pull request
Nov 7, 2025
Summary: After D86041361 landed, we suddenly started getting a ton of warnings of the format: [MOMENTUM][WARNING]: Invalid line under [ParameterSets] section; ignoring limit b_l_pinky3_rz minmax [-0.1, 1.57] This was because we suddenly started flagging when we saw something in the parameter sets section that didn't look like a parameterset. This is IMO a good change to make, but it causes problems with the current parser. It basically just runs all the parsers (parameter sets, parameter transform, parameter limits) over the entire file, basically ignoring the sections. Thus, when the parametersets parser sees a line that looks like a parameter limit, it issues a warning. One fix would be to just back out that change. However, I do think the current approach is not ideal, because it means we have to constantly update all the parsers to ignore stuff from the other parsers, which is potentially error-prone. Instead, I'm suggesting going ahead and breaking the document up into sections in a pre-process. Then for each section we can parse just that section. This turned out to be a little trickier than I expected, however, because in D86041361 we also added the ability to have the same section appear more than once in the file. We could just glue them together, but this screws up line numbers (used for better error messages). Therefore I'm introducing a new glass that appends all the sections _implicitly_, keeping tracking of the start/end line numbers for each. Reviewed By: jeongseok-meta, cstollmeta Differential Revision: D86348623
3b24b4e to
e37794d
Compare
Summary: Pull Request resolved: #790 After D86041361 landed, we suddenly started getting a ton of warnings of the format: [MOMENTUM][WARNING]: Invalid line under [ParameterSets] section; ignoring limit b_l_pinky3_rz minmax [-0.1, 1.57] This was because we suddenly started flagging when we saw something in the parameter sets section that didn't look like a parameterset. This is IMO a good change to make, but it causes problems with the current parser. It basically just runs all the parsers (parameter sets, parameter transform, parameter limits) over the entire file, basically ignoring the sections. Thus, when the parametersets parser sees a line that looks like a parameter limit, it issues a warning. One fix would be to just back out that change. However, I do think the current approach is not ideal, because it means we have to constantly update all the parsers to ignore stuff from the other parsers, which is potentially error-prone. Instead, I'm suggesting going ahead and breaking the document up into sections in a pre-process. Then for each section we can parse just that section. This turned out to be a little trickier than I expected, however, because in D86041361 we also added the ability to have the same section appear more than once in the file. We could just glue them together, but this screws up line numbers (used for better error messages). Therefore I'm introducing a new glass that appends all the sections _implicitly_, keeping tracking of the start/end line numbers for each. Reviewed By: jeongseok-meta, cstollmeta Differential Revision: D86348623
e37794d to
bae4352
Compare
Contributor
|
This pull request has been merged in d7733dc. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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:
After D86041361 landed, we suddenly started getting a ton of warnings of the format:
[MOMENTUM][WARNING]: Invalid line under [ParameterSets] section; ignoring
limit b_l_pinky3_rz minmax [-0.1, 1.57]
This was because we suddenly started flagging when we saw something in the parameter sets section that didn't look like a parameterset.
This is IMO a good change to make, but it causes problems with the current parser. It basically just runs all the parsers (parameter sets, parameter transform, parameter limits) over the entire file, basically ignoring the sections. Thus, when the parametersets parser sees a line that looks like a parameter limit, it issues a warning.
One fix would be to just back out that change. However, I do think the current approach is not ideal, because it means we have to constantly update all the parsers to ignore stuff from the other parsers, which is potentially error-prone. Instead, I'm suggesting going ahead and breaking the document up into sections in a pre-process. Then for each section we can parse just that section.
This turned out to be a little trickier than I expected, however, because in D86041361 we also added the ability to have the same section appear more than once in the file. We could just glue them together, but this screws up line numbers (used for better error messages). Therefore I'm introducing a new glass that appends all the sections implicitly, keeping tracking of the start/end line numbers for each.
Reviewed By: jeongseok-meta, cstollmeta
Differential Revision: D86348623