Skip to content

TangoRodriguez/Kigasensei_Assignment1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mp-degrader-evo2

AI-native pipeline for generating and ranking abstract riboswitch and gene circuit designs using the Evo2 genomic language model. The repository loads JSON specifications, performs safety and environment checks, scores candidates across multiple objectives, and produces Pareto-filtered proposals suitable for follow-up analysis. Wet-lab execution steps are intentionally out of scope.

Quick start

uv pip install -e .[dev]
export NVAPI_KEY="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"
export BACKEND=hosted  # optional, defaults to local fallback
mpd generate --config configs --n 16
mpd score --config configs --scenarios data/env_scenarios
mpd pareto --topk 8 --out outputs/proposals.json

Hosted (NVIDIA Build) backend

  • API key: NVAPI_KEY environment variable (never hardcode)
  • Base URL: https://integrate.api.nvidia.com
  • Route: /v1/chat/completions
  • Model: arc/evo2-40b
curl -X POST "https://integrate.api.nvidia.com/v1/chat/completions" \
  -H "Authorization: Bearer $NVAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "arc/evo2-40b",
    "messages": [
      {"role": "system", "content": "You are safe-by-design; no wet-lab outputs."},
      {"role": "user", "content": "Generate abstract riboswitch motif ideas meeting these JSON constraints: ..."}
    ],
    "temperature": 1.0,
    "max_tokens": 400
  }'

The client automatically retries on 429 and 5xx responses, honors Retry-After, and enforces connection/read timeouts. Secrets are never logged.

Repository layout

  • configs/ – JSON specifications for targets, environment/safety, and scoring objectives.
  • src/mpdegrader/ – Python package with environment window, safety voting, Evo2 client, scoring, and pipeline orchestration utilities.
  • tests/ – pytest suite for environment window, safety vote, and pipeline smoke verification.
  • data/env_scenarios/ – Example scenario JSONL stub for environment robustness calculations.
  • outputs/ – Directory for generated proposal artifacts.

Safety boundaries

  • Outputs remain abstract and non-synthesis ready.
  • The hosted backend adds a defensive system prompt to strip wet-lab instructions.
  • Scoring penalizes unsafe operating regimes through safety and environment persistence rules.

Development

  • Run ruff and mypy for linting and static typing.
  • Use the Typer CLI entry point mpd for end-to-end runs.
  • Tests:
pytest

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors