Skip to content

Conversation

@cdtwigg
Copy link
Contributor

@cdtwigg cdtwigg commented 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

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 7, 2025
@meta-codesync
Copy link
Contributor

meta-codesync bot commented Nov 7, 2025

@cdtwigg has exported this pull request. If you are a Meta employee, you can view the originating Diff in D86348623.

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
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
@meta-codesync
Copy link
Contributor

meta-codesync bot commented Nov 8, 2025

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

CLA Signed This label is managed by the Meta Open Source bot. fb-exported Merged meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants