`m decompose`: the docs example, the smaller-model advice and the generated script don't match what the CLI does
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 18/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- markdown, ollama, python
- Lĩnh vực
- cli, documentation, testing
Hướng nghiên cứu
Start by running the reproduction block on a fresh checkout with Ollama up, then read docs/docs/how-to/m-decompose.md against cli/decompose/decompose.py (default model near line 203, --enable-script-run pass-through near line 456), pipeline.py:171/:596 and cli/decompose/m_decomp_result_v3.py.jinja2:26, where the model id is hardcoded. Run uv run pytest test/decompose test/cli/test_decompose_unit.py test/cli/test_decompose_input.py and the shell examples in docs/examples/m_decompose/ before touching anything. Done means the page's commands run verbatim with matching output, the template starts the session with the model/backend/endpoint actually passed, and the PR pastes transcripts plus per-model run counts for the model advice.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What users see
Someone following how-to/m-decompose.md hits a series of dead ends:
- The page's own example (
task.txtfollowed bypython output/m_decomp_result/m_decomp_result.py) points at a path that never gets created. - The page says the default model is a small Granite model and suggests another small Granite model to avoid a big download. The real default is
mistral-small3.2:latest(24B, 15 GB), and the small models we tried failed the pipeline. - Even when a smaller model works, the generated script hardcodes
mistral-small3.2:latest, so running it pulls the 15 GB model anyway. - The OpenAI example fails immediately with an assertion error.
There is no single big bug here. The CLI, the template, the docs and the examples were each right at some point and have drifted apart. #1838 asks for the Granite version strings on this page to be updated, and #1862 does that, but those edits sit on top of claims that are wrong for other reasons. I'd like the page, the CLI and the examples fixed together.
Terms used below: a job is one task the CLI decomposes. --input-file makes one job per non-empty physical line, and each job gets its own output directory.
What happened
I ran everything on a checkout based on Mellea main (the cli/decompose code is identical to main), with Ollama on macOS. Each run is a single sample, so read the pass/fail results as indicative, not as rates. Measuring them properly is part of the work.
1. The multi-line example creates four jobs, not one.
docs/docs/how-to/m-decompose.md shows a task.txt that is one task wrapped over four lines. The CLI makes one job per non-empty line, so it decomposes four sentence fragments and writes m_decomp_result_1 to m_decomp_result_4. The documented m_decomp_result/ directory does not exist. This behaviour is old (v0.9.0 does the same). #1761, which is not in a release yet, added \n escapes inside a line, and it updated refactor-prompts-with-cli.md but not this page. A fix that uses \n therefore works on main but not on the 0.9.0 CLI.
Also, if a later job fails, the outputs of the earlier jobs are deleted (the docstring says so, but it surprises people). On granite4.1:8b, jobs 1 and 2 completed, job 3 failed to parse, and the output directory ended up empty.
The shell examples have the same problem, from reading the code (I did not run them). docs/examples/m_decompose/example.txt has three non-empty lines, so decompose_using_cli.sh writes three numbered directories, and decompose_intermediary_python_command.sh then runs python ./m_decomp_result.py, which won't exist.
2. Small models fail the pipeline.
granite4.1:3b, single-line task: failed after about 50 s (TagExtractionError).granite4.2:3b: failed after about 6 min (TagExtractionError) in 3 of 3 CLI runs (two single-line, one with the 4-linetask.txt). One call to the Python API with a shorter, different prompt did succeed.granite4.1:8b, single-line task: completed, and the generated script ran end to end.
There is no documented minimum model, and the CLI doesn't warn when a small model is likely to fail.
3. The generated script ignores the model you passed.
cli/decompose/m_decomp_result_v3.py.jinja2:26 has mellea.start_session(model_id="mistral-small3.2:latest"). A script generated with --model-id granite4.1:8b still starts a Mistral session. The CLI help says --enable-script-run makes the script expose argparse overrides for backend, model, endpoint and API key. The option is passed through (decompose.py:456), but no template under cli/decompose/ refers to it, so I don't see how it can work. With the model edited by hand to the 8B, the script ran and exited 0 and produced a blog post.
4. The generated validators are brittle.
In that run, 3 of the script's sampling calls ended with Invoking select_from_failure after 2 failed attempts. One generated validator (validations/val_fn_1.py:13) checks line.startswith("Title:"), while the model wrote **Title:**. I did not look into the other failures.
5. The OpenAI example is incomplete.
--backend openai --model-id gpt-4o-mini fails with AssertionError: Required to provide "backend_endpoint". pipeline.py:219-224 requires both --backend-endpoint and --backend-api-key. The page shows neither.
6. The default model is wrong on the page.
On main, line 62 says m decompose defaults to granite4.1:3b (lines 28 and 89 also use it). #1862 changes those three lines to granite4.2:3b. The real default is mistral-small3.2:latest (decompose.py:203, pipeline.py:171 and :596), which the Ollama library lists at 15 GB. The same page's "~15 GB" note already contradicts the Granite default.
7. Smaller doc gaps.
- The subtask field table omits
general_instructions, which the API returns. - The output includes a
validations/directory that the page never mentions. docs/examples/m_decompose/README.mdanddecompose_using_cli.shsuggestgranite4:latestas an alternative to Mistral. I haven't tried it.
Not tested: I never ran the default mistral-small3.2:latest model, so I can't say whether the pipeline works reliably on it.
What we expected
Every command on the how-to page works as written, the example output matches the page, and the model advice is true. A user who passes --model-id X gets a script that uses X.
How to reproduce
Use a fresh output directory each time. The CLI creates it only after the LLM run and fails with FileExistsError if it already exists.
# The page's task: one task wrapped over four lines
printf '%s\n' \
'Write a short blog post about the benefits of morning exercise.' \
'Include a catchy title, an introduction paragraph, three main benefits' \
'with explanations, and a conclusion that encourages readers to start' \
'their morning exercise routine.' > task.txt
# A single-line version that does complete on a larger model
echo 'Write a short blog post about the benefits of morning exercise, with a title, an introduction, three benefits and a conclusion.' > task_single.txt
# 1. Look for "run pipeline job 1/4" in the output, and for output1/m_decomp_result/ afterwards
mkdir output1 && m decompose run --input-file task.txt --out-dir ./output1/ --model-id granite4.1:8b
# 2 and 3. Single line with a small model, then with the 8B; then check which model the script uses
mkdir output2 && m decompose run --input-file task_single.txt --out-dir ./output2/ --model-id granite4.1:3b
mkdir output3 && m decompose run --input-file task_single.txt --out-dir ./output3/ --model-id granite4.1:8b
grep -n start_session output3/*/*.py
# 5. Fails with the backend_endpoint assertion
mkdir output4 && m decompose run --input-file task_single.txt --out-dir ./output4/ --backend openai --model-id gpt-4o-mini
Success criteria
Whoever picks this up should paste the evidence for each point into the PR.
- Docs run verbatim. Every command and snippet on
how-to/m-decompose.mdis run exactly as written, and the output matches the page. Paste the transcript. - The sample task works. The example is a task the CLI treats as one job (for example one line, or
\nescapes if we ship that), andlsshows the directory names the page claims. The shell examples indocs/examples/m_decompose/are fixed or removed, and run. - Model advice is measured. The page recommends a model only if it completes the sample task reliably. Run it at least 10 times per model and report the model, the number of runs, the failures and the timings in the PR. Maintainers agree the bar when reviewing. If no small model passes, the page says so and states the smallest model that did.
- The script follows the CLI. A script generated with a non-default
--model-idstarts a session with that model (and the chosen backend and endpoint), and runs without any other model being pulled (ollama listbefore and after).--enable-script-runeither works or is removed from the help text. - Generated validators are checked. At least the
Title:case is fixed, and a test or note explains why the other sampling calls failed. - The OpenAI path works. The page shows
--backend-endpointand--backend-api-key, and the example is run against a real endpoint (Ollama's OpenAI-compatible/v1endpoint is enough). - The default model is documented correctly, and has been run end to end at least once.
- Tests and examples all run, before and after. Report pass/fail counts for:
uv run pytest test/decompose test/cli/test_decompose_unit.py test/cli/test_decompose_input.pyuv run pytest -m slow docs/examples/m_decompose(needs Ollama; the example is markedslow, so it is skipped by default)- both shell examples in
docs/examples/m_decompose/, run by hand uv run poe clidocsif any CLI help text changesnpx markdownlint-cli2 "docs/docs/**/*.md"
- Regression tests. Tests cover the chosen behaviour for multi-line input and for the script's model.
Decisions for maintainers before work starts
- Default model. Is a 24B, 15 GB default right for a first run? Changing it means making the pipeline reliable on smaller models first.
- Failed jobs. Should a failure in job N delete the finished output of jobs 1 to N-1, or keep it?
- Released docs. The 0.9.0 snapshot has the same page errors. Do we fix
version-0.9.0too? If so, any\nfix won't work there, because the 0.9.0 CLI has no\nexpansion.
Environment
Mellea main at the time of writing (2026-11-23), Python 3.12, macOS, Ollama running locally. Models: granite4.1:3b, granite4.2:3b, granite4.1:8b.
Related: #1838, #1862, #1761
- Ngôn ngữ chính
- Python
- Star
- 1.8k
- Fork
- 161
- Merge trung bình
- 4 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 45
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của generative-computing/mellea
-
bug: `mellea.plugins.builtin_debug.generation.log_generation_post_call` shows model as unknownĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
generative-computing/mellea#1864 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
bug: instruct() and react() replay tool-call turns without tool_callsCó thể đã có người làm @simonyang08 đã nhận 21 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
generative-computing/mellea#1784 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Silently mangled docstrings: lone backslash line-continuations in non-raw docstrings collapse command examplesCó thể đã có người làm @madhusudhan1260 đã nhận 18 ngày trước. Đang mởgood first issue p2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
generative-computing/mellea#1780 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 3 ngày
-
area/telemetry enhancement p2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
generative-computing/mellea#1210 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Add requirement priorityĐang mởarea/requirement area/stdlib enhancement p2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
generative-computing/mellea#31 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của generative-computing/mellea
Issue tương tự
-
cron: raise a distinct error when next_fire finds no match in its search bound (from #813 item 5)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Pin Hugging Face commit revisions for AuK weight downloads and eliminate post-download SHA TOCTOUĐang mởarea:voice better-dependency-freedom dependencies effort:low in-progress model:medium plan planner:gemini-4-neon-high priority:2 security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-area-label
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
OpenFreeEnergy/openfe#2371 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
HMDB's smiles file writes "None" for metabolites with an empty <smiles/> (file not currently used)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
NCATSTranslator/Babel#1269 ·
Maintainer thường phản hồi trong vòng 1 ngày