Command-line reference¶
Generated from the argument parser by scripts/make_cli_reference.py. Every command also takes
-h or --help, and abmfact --version prints the version. Every command exits with 2 on an
invalid audit file, claim, model or engine, and prints the reason.
abmfact run¶
Run an audit and write results.
abmfact run audit [--seeds SEEDS] [--jobs JOBS] [--quiet] [--out OUT]
Argument |
Meaning |
Default |
|---|---|---|
|
audit YAML file |
required |
|
override budget.seeds |
|
|
override budget.jobs |
|
|
print only errors |
|
|
output directory |
|
Exit status: 0 when the audit finished.
abmfact check¶
Run an audit; exit 1 if any claim is FRAGILE or SHIFTED.
abmfact check audit [--seeds SEEDS] [--jobs JOBS] [--quiet] [--out OUT]
Argument |
Meaning |
Default |
|---|---|---|
|
audit YAML file |
required |
|
override budget.seeds |
|
|
override budget.jobs |
|
|
print only errors |
|
|
also write outputs to this directory |
Exit status: 0 unless any claim is FRAGILE or SHIFTED, then 1.
abmfact demo¶
Audit the planted-fault zoo and print the detection matrix.
abmfact demo [--seeds SEEDS] [--jobs JOBS] [--quiet] [--no-convergence]
Argument |
Meaning |
Default |
|---|---|---|
|
seeds per condition |
|
|
worker processes |
|
|
no progress messages |
|
|
only the seven audit checks (faster) |
Exit status: 0 when the detection matrix is as expected, 1 otherwise.
abmfact init¶
Write a commented audit file template.
abmfact init [--adapter {python,mesa,netlogo,command,engine}] [--output OUTPUT] [--force]
Argument |
Meaning |
Default |
|---|---|---|
|
the kind of model the template is for |
|
|
file to write, or - for stdout |
|
|
overwrite an existing file |
Exit status: 0 when the template was written, 2 when the file exists and --force was not given.
abmfact replay¶
Run one model run and print its outputs.
abmfact replay audit --seed SEED [--params PARAMS] [--knobs KNOBS]
Argument |
Meaning |
Default |
|---|---|---|
|
audit YAML file |
required |
|
the seed to run |
required |
|
JSON object merged into the audit’s params |
|
|
JSON object of knobs, e.g. {“update_order”: “id”} |
Exit status: 0 when the run finished.
abmfact run-model¶
Run one ABM-IR model (or native project) in an engine.
abmfact run-model model [--engine ENGINE] [--out OUT] [--seed SEED] [--params PARAMS] [--knobs KNOBS] [--store STORE] [--option KEY=VALUE] [--quiet]
Argument |
Meaning |
Default |
|---|---|---|
|
ABM-IR file, or a native project folder for engines that take one |
required |
|
engine name (see: abmfact engines) |
|
|
output directory |
|
|
the seed to run |
|
|
JSON object of parameter overrides, e.g. {“experiment.max_time”: 600} |
|
|
JSON object of knobs, e.g. {“dt_scale”: 0.5} |
|
|
run store directory; an identical earlier run is reused |
|
|
engine option, e.g. threads=1 |
|
|
print only errors |
Exit status: 0 when the run finished or was reused from the store, 1 when it failed.
abmfact converge¶
Check that claim metrics converge as dt (and voxel size) are refined.
abmfact converge audit [--seeds SEEDS] [--jobs JOBS] [--quiet] [--out OUT]
Argument |
Meaning |
Default |
|---|---|---|
|
audit YAML file |
required |
|
override budget.seeds |
|
|
override budget.jobs |
|
|
print only errors |
|
|
write convergence.json to this directory |
Exit status: 0 unless a claim metric is NOT_CONVERGED, then 1.
abmfact import¶
Translate a simulator’s project into an ABM-IR model.
abmfact import {physicell} project [--output OUTPUT] [--quiet]
Argument |
Meaning |
Default |
|---|---|---|
|
the simulator the project is for |
required |
|
project folder |
required |
|
ABM-IR file to write |
|
|
print nothing; the fidelity report is still written |
Exit status: 0 when the model was written.
abmfact export¶
Translate an ABM-IR model into a simulator’s project.
abmfact export model --to {physicell} --output OUTPUT [--base BASE] [--quiet]
Argument |
Meaning |
Default |
|---|---|---|
|
ABM-IR file |
required |
|
the simulator to write for |
required |
|
project folder to write |
required |
|
project whose C++ to use |
|
|
print nothing; the fidelity report is still written |
Exit status: 0 when the project was written.
abmfact compare¶
Run one model in several engines and compare against a disagreement budget.
abmfact compare target [--engines ENGINES] [--metric METRIC] [--budget BUDGET] [--seeds SEEDS] [--jobs JOBS] [--out OUT] [--store STORE] [--workdir WORKDIR] [--quiet]
Argument |
Meaning |
Default |
|---|---|---|
|
comparison YAML file, or an ABM-IR model with –engines and –metric |
required |
|
comma-separated engines for a model; the first is the baseline |
|
|
metric to compare, e.g. ‘last(cells)’; repeatable |
|
|
relative budget for –metric (default 0.10) |
|
|
seeds per engine |
|
|
runs at once |
|
|
folder for compare.json |
|
|
run store: finished runs are kept and reused |
|
|
folder for run folders |
|
|
print only errors |
Exit status: 0 unless an engine DISAGREEs with the baseline on a metric, then 1; 2 for an invalid comparison.
abmfact engines¶
List engines, their capabilities and whether they run here.
abmfact engines [--json]
Argument |
Meaning |
Default |
|---|---|---|
|
print JSON instead of a table |
Exit status: 0.
abmfact recommend¶
Rank the engines for one model: can they run it, how faithfully, what checks.
abmfact recommend model [--details] [--json]
Argument |
Meaning |
Default |
|---|---|---|
|
ABM-IR file, or a native project folder |
required |
|
list every approximated or dropped part |
|
|
print JSON instead of a table |
Exit status: 0, also when no engine can run the model; the output says why.
abmfact ensemble¶
Run many seeds of one setting in one engine and summarise with intervals.
abmfact ensemble model [--engine ENGINE] [--seeds SEEDS] [--seed-start SEED_START] [--param KEY=VALUE] [--option KEY=VALUE] [--metric METRIC] [--alpha ALPHA] [--jobs JOBS] [--store STORE] [--workdir WORKDIR] [--out OUT] [--quiet]
Argument |
Meaning |
Default |
|---|---|---|
|
ABM-IR file, or a native project folder for engines that take one |
required |
|
engine name (see: abmfact engines) |
|
|
number of seeds (default 20) |
|
|
the first seed (default 0) |
|
|
parameter for every run, e.g. ‘experiment.max_time=600’; repeatable |
|
|
engine option, e.g. threads=1 |
|
|
metric to summarise, e.g. ‘last(cells)’; repeatable |
|
|
one-sided level; intervals cover 1-2*alpha |
|
|
runs at once |
|
|
run store: finished runs are kept and reused |
|
|
folder for run folders |
|
|
output folder |
|
|
print only errors |
Exit status: 0 when every run worked, 1 when any run failed; 2 for invalid settings or a model the engine refuses.
abmfact sweep¶
Run a model over a design of parameter settings (grid, lhs or sobol).
abmfact sweep sweep [--jobs JOBS] [--store STORE] [--workdir WORKDIR] [--out OUT] [--backend {local,slurm}] [--submit] [--collect] [--quiet]
Argument |
Meaning |
Default |
|---|---|---|
|
sweep YAML file |
required |
|
runs at once (overrides the file) |
|
|
run store: finished runs are kept and reused, so a sweep can resume |
|
|
folder for run folders |
|
|
output folder |
|
|
local runs here; slurm writes a job array for the runs not yet in the store |
|
|
with –backend slurm: also submit the array with sbatch |
|
|
read the runs a Slurm array wrote under OUT/slurm |
|
|
print only errors |
Exit status: 0 when every run worked (or the Slurm array was written), 1 when any run failed or was not collected; 2 for an invalid sweep file.
abmfact sensitivity¶
Sobol or Morris sensitivity indices with bootstrap intervals (SALib).
abmfact sensitivity sensitivity [--method {sobol,morris}] [--n N] [--jobs JOBS] [--store STORE] [--workdir WORKDIR] [--out OUT] [--quiet]
Argument |
Meaning |
Default |
|---|---|---|
|
sensitivity YAML file: a sweep file with a ‘sensitivity’ section |
required |
|
override the file’s method |
|
|
override N (Sobol base sample) or the Morris trajectories |
|
|
runs at once (overrides the file) |
|
|
run store: finished runs are kept and reused |
|
|
folder for run folders |
|
|
output folder |
|
|
print only errors |
Exit status: 0 when every metric got indices (warnings included), 1 when any run failed or a metric got none; 2 for an invalid file.
abmfact calibrate¶
Fit parameters to target data or another engine’s ensemble.
abmfact calibrate calibration [--methods] [--method METHOD] [--jobs JOBS] [--store STORE] [--workdir WORKDIR] [--out OUT] [--quiet]
Argument |
Meaning |
Default |
|---|---|---|
|
calibration YAML file |
required |
|
list the calibration methods and plug-ins, and exit |
|
|
override the file’s method: bayesopt, abc-smc or a plug-in |
|
|
runs at once (overrides the file) |
|
|
run store: finished runs are kept and reused |
|
|
folder for run folders |
|
|
output folder |
|
|
print only errors |
Exit status: 0 when a fit was found; 2 for an invalid file, an unknown method or when no evaluation could be scored.
abmfact translate¶
T2 translation: calibrate a lattice engine’s mapping gains to a source model.
abmfact translate target [--to {compucell3d,morpheus}] [--calibrate-on CALIBRATE_ON] [--hold-out HOLD_OUT] [--free GAIN=LOW:HIGH] [--source-engine SOURCE_ENGINE] [--source-seeds SOURCE_SEEDS] [--seeds SEEDS] [--seed-start SEED_START] [--method METHOD] [--param KEY=VALUE] [--option KEY=VALUE] [--jobs JOBS] [--store STORE] [--workdir WORKDIR] [--out OUT] [--quiet]
Argument |
Meaning |
Default |
|---|---|---|
|
translation YAML file, or an ABM-IR model with –to, –calibrate-on, –hold-out, –free |
required |
|
the target engine |
|
|
comma-separated observables the gains are fitted to |
|
|
comma-separated observables kept out of the fit and reported |
|
|
a mapping gain to fit, e.g. pressure_gain=0.2:5; only pressure_gain and motility_gain |
|
|
the source engine (default reference) |
|
|
seeds of the source ensemble (default 20) |
|
|
seeds per evaluation of the target (default 10) |
|
|
the first seed (default 0) |
|
|
bayesopt (default) or abc-smc |
|
|
fixed ABM-IR parameter for both engines |
|
|
fixed target-engine option |
|
|
runs at once |
|
|
run store: finished runs are kept and reused |
|
|
folder for run folders |
|
|
output folder |
|
|
print only errors |
Exit status: 0 when the gains were calibrated; 2 for an invalid translation, such as a free parameter that is not a mapping gain or a held-out observable that is also calibrated on.
abmfact visualise¶
Plots, cell snapshots, fields, movies and VTK files from results or a run.
abmfact visualise target [--store STORE] [--out OUT] [--times TIMES] [--colour {type,state}] [--field FIELD] [--movie {gif,mp4}] [--vtk] [--quiet]
Argument |
Meaning |
Default |
|---|---|---|
|
a mode’s result file or folder, a run folder, or a run id with –store |
required |
|
run store to find a run id in |
|
|
output folder |
|
|
for a run: last (default), all, or comma-separated times |
|
|
colour cells by type or state |
|
|
substrate to draw (default: every one); repeatable |
|
|
also film every save time |
|
|
also write VTK files for ParaView |
|
|
print only errors |
Exit status: 0 when the plots or files were written; 2 when the target is not recognised.