AxoBench API

axobench CLI

Every subcommand, option, and default of the axobench command.

Usage

axobench <command> --help

The axobench command converts and inspects data and writes diagnostic rows; it does not load models. AxoSim checkpoints are evaluated with axosim-evaluate-model, and other models through the Python evaluator. Errors in file paths or values exit with status 2 and print the message.

make-demo-data

Write deterministic synthetic shards for smoke tests.

Options

--output str · required
Output directory.
--samples int · default=8
Traces per shard.
--shards int · default=1
Number of shards.
--time-steps int · default=32
Steps per trace.
--input-dim int · default=64
Input channels.
--seed int · default=0
Random seed.

Parser source

make-arbor-hetero-data

Simulate heterogeneous Arbor cable cells into shards; requires the sim extra (Arbor 0.11).

Options

--config str · default=None
JSON file whose keys are option names of this command; explicit flags take precedence.
--output str · default=None
Output directory; required unless set in --config.
--samples int · default=128
Traces when --splits is not given.
--shards int · default=1
Shards when --splits is not given.
--splits str · default=None
Comma-separated NAME:SAMPLES pairs written as separate split directories.
--shards-per-split int · default=1
Shards per split with --splits.
--time-steps int · default=6000
Steps per trace.
--input-dim int · default=1278
Input channels.
--branches int · default=45
Dendritic branches of the cable cell.
--integration-dt-ms float · default=0.025
Simulator integration step in ms.
--input-protocol str · default='arbor_poisson'
Input event generator. Choices: arbor_poisson, neuronio_smoothed.
--synapse-routing str · default='branch'
Synapse placement: one site per branch, or distributed sites. Choices: branch, distributed.
--distributed-sites-per-polarity int · default=None
Sites per sign with distributed routing.
--spike-label-mode str · default='threshold_crossing'
How output spikes are labeled. Choices: threshold_crossing, local_peak.
--spike-peak-threshold-mv float · default=-25.0
Voltage threshold of spike labels in mV.
--base-event-rate-hz float · default=2.0
Baseline input event rate in Hz.
--burst-probability float · default=0.015
Probability of an input burst.
--burst-event-rate-hz float · default=35.0
Input event rate during bursts in Hz.
--arbor-gpu-id int · default=0
GPU used by Arbor.
--cpu-only flag · default=False
Use Arbor's CPU context.
--arbor-threads int · default=1
Arbor CPU threads.
--sim-batch-size int · default=32
Independent cells per Arbor simulation.
--seed int · default=0
Random seed.
--param-overrides str · default=None
JSON object, or a path to one, overriding heterogeneity parameters for all traces.
--report str · default=None
Optional path for a copy of the generation report.

Parser source

convert-neuronio

Convert raw NeuronIO pickles to deterministic shards.

Options

--input str · required
Raw file or directory searched for *sim__* files.
--output str · required
Output directory.
--shard-size int · default=128
Traces per shard.
--window-size int · default=None
Optional window length.
--window-stride int · default=None
Window stride; defaults to the window length.
--ignore-start int · default=0
First window start when windowing.

Parser source

repack-shards

Repack shards as sliceable .npy arrays with a manifest.

Options

--input str · required
Source split directory.
--output str · required
Destination directory.
--input-dtype str · default='int8'
Storage dtype of the inputs; values must be preserved. Choices: int8, float32.

Parser source

benchmark-profile

Print an axis/default profile as JSON.

Options

--name str · default='paper-default'
Profile name. Choices: smoke, paper-default, teacher-screen.
--plan flag · default=False
Print the expanded axis-composition plan.
--cost flag · default=False
Print only the local capacity estimate.

Parser source

dataset-schema

Print the v1 manifest template or the diagnostic suite catalog as JSON.

Options

--kind str · default='manifest'
manifest for the template, diagnostics for the suite catalog. Choices: manifest, diagnostics.

Parser source

benchmark-rows

Write teacher QC or teacher intervention rows for an evaluation root.

Options

--mode str · default='teacher-qc'
teacher-qc rows or intervention rows. Choices: teacher-qc, intervention.
--dataset-root str · required
Evaluation root.
--selector str · default='val'
Read val or an intervention condition. Choices: val, intervention.
--intervention str · default='event_dropout'
Condition name with --selector intervention.
--pair-path str · default=None
Pair file outside the v1 layout; used with --mode intervention.
--output str · required
Rows file: .json, .jsonl, or .csv.
--summary-output str · default=None
Optional summary: .md or .json.
--suites str · default='teacher-qc'
Comma-separated suites.
--morphology-id str · default='unknown'
Morphology label of the rows.
--teacher-id str · default='teacher'
Teacher label.
--max-samples int · default=None
Maximum traces or pairs, read from the start.
--cache-shards int · default=1
Decoded shards kept in memory.
--ignore-start int · default=500
Initial steps excluded.
--soma-scale float · default=0.1
Scale of the soma target coordinate.
--soma-bias-mv float · default=-67.7
Millivolt offset of the soma target coordinate.
--calibrated-spike-threshold float · default=None
Spike threshold recorded with the rows.

Parser source

diagnostic-audits

Derive audit rows from saved comparison artifacts.

Options

--teacher-grounded-rows str · default=None
Teacher-grounded comparison rows.
--local-stability-rows str · default=None
Local stability rows.
--perturbation-rows str · default=None
Perturbation rows.
--pretrained-summary-rows str · default=None
Pretrained-model summary rows.
--teacher-protocol str · default=None
Teacher protocol JSON.
--output str · required
Rows file: .json, .jsonl, or .csv.
--summary-output str · default=None
Optional summary: .md or .json.
--suites str · default='metric-decoupling,target-view-audit,robustness-directionality,protocol-coverage,adapter-fairness,paper-summary'
Comma-separated audit suites.
--model-id str · default='analysis'
Model label.
--teacher-id str · default='teacher'
Teacher label.
--morphology-id str · default='mixed'
Morphology label.
--split str · default='analysis'
Split label.
--condition str · default='analysis'
Condition label.

Parser source

diagnostic-plots

Write the audit figures and tables from saved audit summaries.

Options

--canonical-summary str · required
Canonical audit summary JSON.
--mechanistic-summary str · required
Mechanistic response summary JSON.
--sparse-event-summary str · required
Sparse-event sensitivity summary JSON.
--point-rows str · required
Point metric rows.
--tcn-summary str, repeatable · required
TCN preprocessing summary JSON; repeatable.
--morphology-contrast-rows str · default=None
Optional morphology contrast rows.
--neuronio-intervention-rows str · default=None
Optional NeuronIO intervention rows.
--neuronio-intervention-root str · default=None
Optional NeuronIO intervention directory.
--output-dir str · required
Output directory.
--formats str · default='svg,pdf,png'
Comma-separated figure formats.

Parser source

error-anatomy

Break a cached prediction’s errors down by spike outcome, spike distance, firing rate, frequency band, and morphology; writes error-anatomy.json, the figure, and error-anatomy.tex, and prints the overall skills.

Options

--cache str · required
Evaluation cache from write_model_evaluation_cache, or any NPZ with a prediction array.
--targets str · default=None
NPZ with target and optional raw_soma_mv and trace_ids; defaults to the cache file. Must match the cache's target hash and trace IDs when the cache records them.
--output str · required
Output directory.
--ignore-start int · default=None
Initial steps excluded; defaults to the cache protocol's value, else 500.
--calibration-fraction float · default=None
Fraction of traces used for threshold calibration; defaults to the cache protocol's value, else 0.25.
--formats str · default='pdf,png'
Comma-separated figure formats.

Parser source

benchmark-v1

Run the teacher bundle on an evaluation root: QC, routing, intervention, and morphology-contrast rows.

Options

--dataset-root str · required
Evaluation root.
--output-dir str · required
Output directory.
--suite str · default='paper-summary'
Suite profile. Choices: teacher-qc, paper-summary, full.
--intervention-pair-glob str, repeatable · default=[]
Glob of pair files outside the v1 layout; repeatable.
--morphology-id str · default='unknown'
Morphology label of the val rows.
--teacher-id str · default='teacher'
Teacher label.
--max-val-samples int · default=None
Maximum validation traces.
--max-intervention-samples int · default=None
Maximum pairs per condition and morphology.
--cache-shards int · default=1
Decoded shards kept in memory.
--ignore-start int · default=500
Initial steps excluded.
--soma-scale float · default=0.1
Scale of the soma target coordinate.
--soma-bias-mv float · default=-67.7
Millivolt offset of the soma target coordinate.
--calibrated-spike-threshold float · default=None
Spike threshold recorded with the rows.
--no-summaries flag · default=True
Write only machine-readable rows and the manifest.

Parser source

Search guides, examples, and API signatures.