You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: decompose pipeline KeyError when constraint strings don't exactly match between stages #755
docs/examples/m_decompose/python/python_decompose_example.py fails with a KeyError in finalize_result. Found when explicitly running slow tests on a Mac M1 (32 GB).
KeyError: '* The blog post must have a catchy title'
Traceback points to cli/decompose/pipeline.py:431:
constraint_val_data is keyed on the raw strings returned by constraint_extractor (e.g. "The blog post must have a catchy title"). Later, subtask_data.constraints is populated by a separate model call which can return the same constraints with slight formatting differences — in this case a * bullet prefix. The dict lookup then fails.
There's no normalisation of constraint strings between the two stages.
Suggested Fix
Strip leading punctuation/whitespace when building or looking up constraint_val_data keys, or normalise constraint strings at extraction time so both stages agree on the format.
Flagging for @AngeloDanducci as the main author of the pipeline.
@AngeloDanducci Thank you for pointing it to me. Yes, the issue was solved in #569.
The m_decompose/python/* are the tmp files of the previous example which should be cleaned up eventually. They are removed on the #770 and will be merged then. @planetf1@AngeloDanducci
Hi @planetf1 I am the the primary owner of the m decompose. Thanks for running the tests! There are currently two pending merge commits (#769 and #770). Please feel free to test by decompose_using_cli.sh with the recommended default model (smaller or weaker llms will have hulluciations). For GPU, we recommend an RTX 5090 or newer, or an Apple M3 chip or above.
Activity
AngeloDanducci commentedon Mar 27, 2026
I'm the author of the example but not the primary author of the pipeline 😅
I'll take a look at the changes in the upgraded pipeline last week - I think we solved a similar issue previously in #569
csbobby commentedon Apr 1, 2026
@AngeloDanducci Thank you for pointing it to me. Yes, the issue was solved in #569.
The m_decompose/python/* are the tmp files of the previous example which should be cleaned up eventually. They are removed on the #770 and will be merged then. @planetf1 @AngeloDanducci
csbobby commentedon Apr 1, 2026
Hi @planetf1 I am the the primary owner of the
m decompose. Thanks for running the tests! There are currently two pending merge commits (#769 and #770). Please feel free to test by decompose_using_cli.sh with the recommended default model (smaller or weaker llms will have hulluciations). For GPU, we recommend an RTX 5090 or newer, or an Apple M3 chip or above.