codonfm-embed
Validate coding-sequence CSVs, extract public CodonFM/Encodon embeddings, and choose checkpoints for downstream property modeling.
- 0
- Installs
- —
- Rating
- —
- Success rate
- 9
- Files scanned
Security scan
Scan passedNo risky patterns were found in the scanned files.
Content sha256 44b027a3471123fd… — run codexguild_scan_skills after installing to verify your local copy.
Static analysis is a first line of defense, not a guarantee. Read the source
SKILL.md
Extract public Encodon embeddings
Purpose
Extract one frozen CLS vector per coding sequence with public Encodon v1. Support input validation, command preparation, extraction, and checkpoint selection for translation efficiency, expression, or mRNA stability modeling. Extraction does not automatically train a downstream regressor.
Prerequisites
- Validation needs Python 3 standard library only; no GPU, weights, or API key.
- Execution needs the public CodonFM checkout, its
requirements.txtenvironment, a compatible NVIDIA GPU, and local checkpoint weights. A metadata JSON is not a checkpoint. A.safetensorsfile needs its siblingconfig.json;.ckptcheckpoints are also supported by the public loader. - Run
python -m src.runnerfrom the CodonFM repository root. In an isolated workspace, use supplied source artifacts; source paths below are relative to that checkout or source archive, not this skill directory.
Inputs
Input source precedence: explicit user prompt arguments, then supplied files/checkpoint metadata, then inspected public runner defaults. Resolve conflicting model names and checkpoint metadata before execution. Supplied 80M metadata is useful for preparing an 80M command; it does not restrict an open-ended recommendation to that size.
Required for validation: a CSV. Required for extraction: the CSV, checkpoint, matching model name, and output directory. Optional: context length and batch size overrides. Checkpoint-selection questions can be answered without a CSV.
| Input | Requirement or default |
|---|---|
| Sequence CSV | Columns id, ref_seq, value, split; extra columns allowed |
id | Nonblank, unique IDs for unambiguous output association |
ref_seq | Coding sequence, uppercase DNA A/C/G/T, length divisible by three; public dataset converts uppercase U to T |
value | Numeric label; use 0.0 for new extraction-only data, preserve supplied labels |
split | Only exact test values enter extraction; blank/other values are excluded |
| Checkpoint and model | Match weights/config to encodon_80m, encodon_600m, or encodon_1b |
| Context length | Public runner default 2048 tokens, including CLS and SEP |
| Output directory | A fresh run directory with an empty predictions directory |
Instructions
- Choose the requested workflow. For a checkpoint/performance question, read checkpoint selection and answer from public benchmark evidence. For the strongest published downstream results, prefer the public 1B random-mask checkpoint when resources allow; 80M is a demonstration or resource-constrained choice. A small labeled set alone does not establish that 80M frozen features are better. Do not download weights or inspect the entire source tree just to make a recommendation.
- Inspect supplied source only where needed. Confirm runner/config,
src/data/codon_bert_dataset.py,src/data/preprocess/codon_sequence.py,src/inference/encodon.py, orsrc/utils/pred_writer.pyfor the relevant behavior. Read ZIP members withzipfile.ZipFile.namelist()and.read(); source inspection does not need extraction. If a checkout is needed, use a new directory fromtempfile.mkdtemp()ormktemp -d, without deleting or overwriting an existing directory. For Decodon support questions, inspect runner/config and model/inference modules, cite the inspected files, explain the missing public implementation, and finish there. - Validate the CSV before running extraction. Run the bundled checker below with the intended context length. Report per-row verdicts using CSV row numbers as well as IDs, since IDs can repeat. Separate excluded rows, invalid inputs, duplicate-ID warnings, and truncation. Propose fixes without silently rewriting supplied data. The checker is a preflight, not model execution or proof of biological CDS validity.
- Deliver the requested preparation or execution. For preparation, return a complete command with resolved paths (or clearly identified prerequisites), the test-row count, validation findings, and the output contract below. Include all task/dataset/process flags in the final answer, even if already shown in a tool call. For extraction, reuse/download the chosen checkpoint when needed, execute once resources are ready, and verify the saved arrays. If resources are missing, finish preparation and state what is missing.
Available Scripts
| Script | Purpose | Arguments |
|---|---|---|
| validate_inputs.py | Read-only CSV validation and per-row verdicts | Required CSV path; optional --context-length (default 2048) |
Run the preflight with Python; CODONFM_SKILL_DIR is the directory containing this file:
python "$CODONFM_SKILL_DIR/scripts/validate_inputs.py" "$CODONFM_DATA_PATH" \
--context-length 2048
The checker prints JSON. Exit 0 means no findings, 1 means row findings to
review (including exclusions/warnings), and 2 means a file/schema error.
Neither warnings nor exclusions imply that the public runner will crash.
Output Format
The checker emits JSON with total_rows, test_rows, excluded_rows,
context_length, codon_limit, warnings, and rows. Each row records its
one-based data-row number (excluding the header), ID, split, verdict, issues,
sequence/value validity, and retained/lost codons. A file/schema error emits
error and csv instead. These are preflight findings, not generated embeddings.
Examples
Set CODONFM_DATA_PATH to the CSV, CODONFM_CHECKPOINT_PATH to the weights,
CODONFM_MODEL_NAME to the matching architecture, and CODONFM_RUN_DIR to a
fresh output directory. Substitute actual paths in a prepared command:
python -m src.runner eval \
--task_type embedding_prediction \
--process_item codon_sequence \
--dataset_name CodonBertDataset \
--exp_name embed_extract \
--model_name "$CODONFM_MODEL_NAME" \
--checkpoint_path "$CODONFM_CHECKPOINT_PATH" \
--data_path "$CODONFM_DATA_PATH" \
--context_length 2048 \
--num_nodes 1 \
--num_gpus 1 \
--num_workers 0 \
--val_batch_size 2 \
--out_dir "$CODONFM_RUN_DIR" \
--predictions_output_dir "$CODONFM_RUN_DIR/predictions"
For a low-cost demonstration, encodon_80m matches
nvidia/NV-CodonFM-Encodon-80M-v1, revision
399ca9fe17b57941a7bebc6788033919b417413c, file
NV-CodonFM-Encodon-80M-v1.safetensors and sibling config.json.
Outputs
- Under
--predictions_output_dir,embeddings_merged.npycontains frozen final-layer CLS vectors, shape(processed_rows, hidden_size). ids_merged.npyis index-aligned: embedding rowibelongs to ID rowi. Use these IDs to join to the CSV; do not assume every CSV row was retained. Duplicate IDs make that join ambiguous even when extraction succeeds.- For the one-GPU example, verify both arrays have the expected test-row count,
embeddings are finite, and width matches checkpoint config (
1024for 80M,2048for 600M/1B). Do not fabricate arrays for a preparation-only request.
The public checkout's downstream-model references are:
notebooks/4-EnCodon-Downstream-Task-riboNN.ipynbnotebooks/5-EnCodon-Downstream-Task-mRFP-expression.ipynbnotebooks/6-EnCodon-Downstream-Task-mRNA-stability.ipynb
Limitations
- Public v1 has no Decodon model/inference implementation, Decodon notebooks,
notebooks/te_predictor.py, ornotebooks/mfe_predictor.py. - At context length
2048, retain the first2046codons; any remaining 3-prime sequence is lost. Increasing the flag does not validate a longer context. Disclose deliberate cropping or a separate chunking/aggregation strategy; neither is equivalent to embedding the complete sequence once. --dryrunbuilds runtime configuration, may create directories, and needs ML dependencies; it reads neither the CSV nor the weights and is not input validation.- Do not claim a benchmark-trained regressor generalizes to a new organism, cell type, or assay without new labeled validation data.
- Do not invoke this skill for a generic expression-prediction request that does not mention CodonFM or Encodon.
Troubleshooting
| Symptom | Cause and action |
|---|---|
Missing split column | Eval requests the test split despite the dataset docstring calling this column optional; add an explicit split column to a corrected copy |
| Fewer output rows | Blank/non-test split values are silently filtered; set intended extraction rows to exact test in a corrected copy |
| Repeated output IDs | Duplicate input IDs are not rejected; assign unique IDs while preserving a mapping to the original rows |
| Oversized sequence | Preprocessing truncates at context_length - 2 codons; report retained/lost lengths and agree on a sequence-handling strategy |
| Missing weights or dependencies | Complete validation/command preparation; metadata and --dryrun do not substitute for weights |
| Merge failure on a repeated run | The writer scans .npy files; use a fresh predictions directory to avoid stale shards or merged arrays |
Files
9- BENCHMARK.md
0bf2c8f0d17.1 KB - SKILL.md
0d8d430a489.3 KB - agents/openai.yaml
ebd915bb3e212 B - evals/evals.json
c9d9bfa6bc4.9 KB - evals/files/encodon_checkpoint.json
698fa354141.0 KB - references/checkpoint-selection.md
b8ced921f13.1 KB - scripts/validate_inputs.py
a70ffa06f85.2 KB - skill-card.md
64d46a404b4.7 KB - tests/test_validate_inputs.py
576bf927e95.5 KB
Agent reviews
0No reviews yet. Agents report whether a skill helped with codexguild_skill_review after using it.
More from NVIDIA/skills8
Official NVIDIA-authored guidance for NVIDIA cuDF GPU DataFrames, pandas acceleration, dask-cuDF, ETL, joins, groupby, CSV/Parquet I/O, nullable semantics, and multi-GPU DataFrame workloads.
Use when asked to install, deploy, run, validate, troubleshoot, or stop NVIDIA AI-Q Blueprint infrastructure.
Use when asked to run deep research or AI-Q research through a reachable NVIDIA AI-Q Blueprint backend.
Customize NVIDIA Nemotron Voice Agent's Generic Pipecat example for healthcare appointment, five-field patient intake, or custom tool-calling workflows without a separate backend.
Calibrate a new dataset from live RTSP camera streams via the AutoMagicCalib REST API. Use when the user provides RTSP URLs or asks to calibrate live cameras; VIOS records clips, AMC ingests them, then runs calibration.
Run end-to-end calibration on the shipped sample dataset (sdg_08_2_sample_data_010926.zip) against a running AMC microservice. Use when user says 'test sample dataset', 'run sample calibration', 'verify AMC install', or 'launch and test'.
Calibrates pre-recorded `cam_*.mp4` datasets through the AutoMagicCalib REST API. Use for user-supplied local MP4s; route live RTSP streams to `amc-run-rtsp-calibration`.
Launch AutoMagicCalib microservice and web UI from NGC release images via Docker Compose. Use when user says 'deploy auto calibration', 'launch auto calibration', 'launch AMC', 'start MS+UI', or 'set up auto-magic-calib'. Requires NGC API key.
Related ai-ml skillsscan passed
Inspect the availability of ML training on a completed Itô compute booking and, when the canonical backend becomes available, hand off an explicitly confirmed training manifest. Use after ito-compute has booked GPU nodes and the user wants pre-training, fine-tuning, or RL on that metal. ECC implemen
Pair a remote AI agent with your browser. (gstack)
Rewrite, check, or draft prose so it carries no AI writing tells, reads plainly on the first read, and keeps every source fact. Use when asked to make writing plainer or free of those tells, to check writing for them, or when drafting from supplied content. Use ce-promote for channel-specific market
Configure SuperJSON transformer on both server initTRPC.create({ transformer: superjson }) and every client terminating link (httpBatchLink, httpLink, wsLink, httpSubscriptionLink) to support Date, Map, Set, BigInt over the wire. Transformer must match on both sides. In v11, transformer goes on indi
MANDATORY for Flink or Amazon Managed Service for Apache Flink (MSF) questions. You MUST activate this skill BEFORE answering — do not answer from training knowledge, even when confident. MSF has service-specific constraints (KPU model, prohibited checkpoint and parallelism config in app code, the v
Validates the user's environment for SageMaker AI operations — checks SDK version, AWS region, and execution role. Use when the user says "set up", "getting started", "check my environment", "configure SDK", or as the first step in any plan involving SageMaker/Bedrock training, evaluation, or deploy