Skip to content

Refactor/Cleanup#5

Open
MateoZ05 wants to merge 4 commits into
mainfrom
refactor-cleanup
Open

Refactor/Cleanup#5
MateoZ05 wants to merge 4 commits into
mainfrom
refactor-cleanup

Conversation

@MateoZ05

Copy link
Copy Markdown
Collaborator

Cleaned up llmize entire codebase for shipping, removes tooluniverse and enrichment stack, consolidate JSON-reduction modules, and fixes stalls with smaller models.

What changed

Removals / decoupling

Deleted enrich.py and all ToolUniverse/enrichment wiring (--enrich, deps, Docker/Nextflow flags); moved extract_entities into verify.py (its only consumer).
Removed dead code: call_ollama, json_reduction/main.py, json_reduction/json_topKeys.py, plus unused imports/params. Dropped tooluniverse/PyYAML from requirements and the Docker build.

Simplification

Unified whole-report and section-by-section into a single interpret_report() (whole report = one chunk; synthesis only when >1).
interpret.py is now a pure library; pipeline.py is the single CLI entry point.
Consolidated json_reduction/ (json_load/clean/write/merger → one reduction.py).
Reduction + annotation now run in memory; --save-intermediates writes the intermediate JSON only when requested.

Fixes

Fixed a small-model stall on numeric sections (e.g. deconvolved_probs): _round_floats() strips spurious 17-digit float precision from prompts, which was triggering repetition loops.
Reconciled with main: preserved the gene-split (verify.py), prompt-injection escaping (main.nf), prompt tweaks, and the data-grounding review feature; repaired the review path's extract_entities import after enrich removal.

Verification
Deterministic outputs (annotated report, entities, prompts) byte-identical to the pre-refactor baseline, except the intended prompt-float rounding.
compileall and pipeline.py --check pass; no reintroduced enrich/ToolUniverse references.
Full offline Docker and Nextflow runs complete end-to-end with a small model.
Summary generated by Claude Code

@MateoZ05
MateoZ05 requested a review from dimalvovs July 21, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant