Skip to content

fix: update python decompose example #566

Closed

Description

@AngeloDanducci
  • The python decompose example needs a larger model to guarantee tags are created appropriately for subtasks.
  • Ref update to the cli needs to be updated.
  • Changes to the decompose pipeline in fix(mellea decomp): Solve ConstraintExtractor parsing fails and improve robustness #445 have made it so that subtask_data.constraints may now contain constraint strings that were not in the original task_prompt_constraints list (they're sub-parts of split constraints). Initial approach to get the test working again will be to simply assign llm as the validation strategy if none exists. Though perhaps elsewhere in the pipeline it should instead map parent -> child (split constraints) validation strategy.

Activity

  1. psschwei commented on Mar 3, 2026

    @psschwei
    Contributor

    FWIW, I tried running with granite3.3:8b this morning and got this error:

    Traceback (most recent call last):
      File "/Users/paulschw/generative-computing/mellea/docs/examples/m_decompose/python/python_decompose_example.py", line 229, in <module>
        main()
      File "/Users/paulschw/generative-computing/mellea/docs/examples/m_decompose/python/python_decompose_example.py", line 208, in main
        result = run_decompose(task_prompt)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/paulschw/generative-computing/mellea/docs/examples/m_decompose/python/python_decompose_example.py", line 33, in run_decompose
        result = decompose(
                 ^^^^^^^^^^
      File "/Users/paulschw/generative-computing/mellea/cli/decompose/pipeline.py", line 119, in decompose
        cons_key: validation_decision.generate(m_session, cons_key).parse()
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/paulschw/generative-computing/mellea/cli/decompose/prompt_modules/_prompt_modules.py", line 34, in parse
        return self._parser(self.__str__())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/paulschw/generative-computing/mellea/cli/decompose/prompt_modules/validation_decision/_validation_decision.py", line 70, in _default_parser
        return _ValidationDecision._assert_output_format(normalized_decision)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/paulschw/generative-computing/mellea/cli/decompose/prompt_modules/validation_decision/_validation_decision.py", line 31, in _assert_output_format
        raise AssertionError(
    AssertionError: LLM generated invalid output: "llm
    all tags are closed and my assignment is finished.". Expected either "code" or "llm".
    
  2. AngeloDanducci commented on Mar 3, 2026

    @AngeloDanducci
    ContributorAuthor

    See. my comment in the mentioned PR, this fixes that issue as well.

  3. added
    documentation
    on Mar 18, 2026
  4. planetf1 commented on Mar 18, 2026

    @planetf1
    Contributor

    Addressed by PR #569 (fix: python decompose model change and pipeline fix).

  5. AngeloDanducci commented on Mar 18, 2026

    @AngeloDanducci
    ContributorAuthor

    Didn't specify "fixes" in the pr oops, correct we can close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

documentation

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions