Refactor/Cleanup#5
Open
MateoZ05 wants to merge 4 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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