Skip to content

work in progress, docker, nextflow#4

Open
MateoZ05 wants to merge 5 commits into
mainfrom
nextflow-implementation
Open

work in progress, docker, nextflow#4
MateoZ05 wants to merge 5 commits into
mainfrom
nextflow-implementation

Conversation

@MateoZ05

@MateoZ05 MateoZ05 commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Nextflow integration: main.nf + nextflow.config for reproducible pipeline execution. Added containerization with our Dockerfile and boot scripts for offline Ollama use. Added fact checking via review_interpretation() and verify.py to re-read and rewrite claims in loops to reduce hallucinations. New CLI passes with --review and --review-passes for our fact checking.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a reproducible execution path for the llmize pipeline via Nextflow + Docker, and adds an optional self-review loop intended to reduce unsupported gene/cell-type claims in generated interpretations.

Changes:

  • Added Nextflow workflow (main.nf) and configuration (nextflow.config) to run the pipeline with Docker.
  • Added Docker image build + runtime boot scripts to start Ollama and support offline model caching.
  • Added deterministic symbol checks (verify.py) and an optional review loop integrated into the CLI (pipeline.py / interpret.py).

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
verify.py Adds deterministic extraction of “unsupported” symbol tokens for review passes.
pipeline.py Adds --review / --review-passes, env-driven model default, and hooks review into pipeline execution.
interpret.py Adds review prompt/system prompt + review loop; improves per-section logging with timing/flush.
main.nf Defines Nextflow INTERPRET process to run the pipeline (optionally booting Ollama in-container).
nextflow.config Provides Nextflow params defaults and Docker configuration (container + host cache mount).
Dockerfile Builds a combined Ollama + Python pipeline image and optionally bakes models.
docker/entrypoint.sh ENTRYPOINT that boots Ollama then runs the provided command (or --check).
docker/boot_ollama.sh Starts Ollama, waits for readiness, and pulls/uses cached models (offline-aware).
.gitignore Ignores Nextflow work dirs/logs/results artifacts.
.dockerignore Excludes generated outputs/intermediates from Docker build context.

Comment thread main.nf Outdated
Comment thread verify.py
Comment thread Dockerfile
Comment thread interpret.py
Comment thread interpret.py
Comment thread pipeline.py
Comment on lines +230 to +235
if review:
print(f"[pipeline] Reviewing interpretation (up to {review_passes} pass(es))...")
response = review_interpretation(
response, model=model, report=report, num_ctx=num_ctx,
passes=review_passes, think=think, gen_options=gen_options,
)
Comment thread docker/boot_ollama.sh
MateoZ05 and others added 4 commits July 10, 2026 16:58
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Reword for positive grounding, make changes to report_vocabulary() in verify.py to not delete any important genes ranked below 50.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.

3 participants