design(adapters): IOContract.build_prompt is unimplemented and uncalled everywhere — decide whether to finish it or remove it
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
- 35/100
Hướng nghiên cứu
Start with mellea/stdlib/components/intrinsic/_core.py and inspect the IOContract interface, then trace the generation paths and concrete contract implementations named in the issue, including mellea/backends/huggingface.py. First establish whether any prompt-building call sites exist; done means making and documenting a decision to implement build_prompt consistently or remove it from the interface. This requires maintainer agreement on scope.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
Epic #929 migrated several capabilities onto IOContract (rag.py, guardian.py, requirement_check — Phase 1, #1136–#1139, #1332), but only the output side of the contract actually got wired through. parse() is called from real code:
# mellea/stdlib/components/intrinsic/_util.py:252
return adapter.io_contract.parse(result_str)
and its own follow-up issue (#1516) formalised that path properly.
build_prompt() never got the matching treatment. It's abstract on IOContract (_core.py:141), and every concrete subclass either raises NotImplementedError (_DictContract/_ListContract) or is a placeholder that says outright it isn't used:
# mellea/backends/huggingface.py:3234, on _UnusedIOContract
def build_prompt(self, **kwargs: object) -> Component:
raise NotImplementedError(
"not used on the intrinsic generation path: "
"_generate_from_intrinsic builds prompts via IntrinsicsRewriter."
)
A repo-wide search for .build_prompt( finds zero call sites — not just for intrinsics, for any capability. So the epic went half-way: the output side got unified, the input side didn't, and nothing ever decided whether it should be.
Why this matters now
Three independent pieces of adapter work have each run into this and each deliberately routed around it rather than resolve it:
- Discussion #1486 rejects folding activation/reformatting into
build_prompt. - Issue #1633 (
ServerMediatedBindingsemantics) explicitly says its work "does not migrate rawio.yamlexecution intoIOContract." - Issue #993 (prompt-based fallback adapters) is reusing
IntrinsicsRewriterrather than implementingbuild_prompt, for the same reason the other two gave.
Three in a row correctly declining to touch it means the gap itself needs a decision, not another workaround.
Ask
Decide one of:
- Finish it. File the input-side equivalent of #1516:
_generate_from_intrinsic(and the other generation paths) would calladapter.io_contract.build_prompt(**kwargs)instead of instantiatingIntrinsicsRewriterdirectly, and everyIOContractsubclass gets a real implementation instead of a stub or a raise. - Remove it. Drop
build_promptfrom theIOContractabstract interface and document that prompt construction is intentionally out of scope for it —IOContractbecomes an output-parsing contract only, closing the asymmetry the other way.
No urgency — not blocking #993 or #1633. Filed so the gap is tracked rather than rediscovered by the next person who bumps into it.
- 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ự
-
Độ 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
-
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 1 ngày
-
404 on sample dataĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
bcgov/nr-hydrometric-rating-curve#443 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100