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

audit YAML file

required

--seeds

override budget.seeds

--jobs

override budget.jobs

-q, --quiet

print only errors

--out

output directory

abmfact-results

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

audit YAML file

required

--seeds

override budget.seeds

--jobs

override budget.jobs

-q, --quiet

print only errors

--out

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

seeds per condition

100

--jobs

worker processes

1

-q, --quiet

no progress messages

--no-convergence

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

--adapter

the kind of model the template is for

python

-o, --output

file to write, or - for stdout

audit.yaml

--force

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

audit YAML file

required

--seed

the seed to run

required

--params

JSON object merged into the audit’s params

--knobs

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

model

ABM-IR file, or a native project folder for engines that take one

required

--engine

engine name (see: abmfact engines)

reference

--out

output directory

abmfact-run

--seed

the seed to run

0

--params

JSON object of parameter overrides, e.g. {“experiment.max_time”: 600}

--knobs

JSON object of knobs, e.g. {“dt_scale”: 0.5}

--store

run store directory; an identical earlier run is reused

--option

engine option, e.g. threads=1

-q, --quiet

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

audit YAML file

required

--seeds

override budget.seeds

--jobs

override budget.jobs

-q, --quiet

print only errors

--out

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

{physicell}

the simulator the project is for

required

project

project folder

required

-o, --output

ABM-IR file to write

model.yaml

-q, --quiet

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

model

ABM-IR file

required

--to

the simulator to write for

required

-o, --output

project folder to write

required

--base

project whose C++ to use

-q, --quiet

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

target

comparison YAML file, or an ABM-IR model with –engines and –metric

required

--engines

comma-separated engines for a model; the first is the baseline

--metric

metric to compare, e.g. ‘last(cells)’; repeatable

--budget

relative budget for –metric (default 0.10)

0.1

--seeds

seeds per engine

--jobs

runs at once

--out

folder for compare.json

--store

run store: finished runs are kept and reused

--workdir

folder for run folders

-q, --quiet

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

--json

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

model

ABM-IR file, or a native project folder

required

--details

list every approximated or dropped part

--json

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

model

ABM-IR file, or a native project folder for engines that take one

required

--engine

engine name (see: abmfact engines)

reference

--seeds

number of seeds (default 20)

20

--seed-start

the first seed (default 0)

0

--param

parameter for every run, e.g. ‘experiment.max_time=600’; repeatable

--option

engine option, e.g. threads=1

--metric

metric to summarise, e.g. ‘last(cells)’; repeatable

--alpha

one-sided level; intervals cover 1-2*alpha

0.05

--jobs

runs at once

1

--store

run store: finished runs are kept and reused

--workdir

folder for run folders

--out

output folder

abmfact-ensemble

-q, --quiet

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

sweep YAML file

required

--jobs

runs at once (overrides the file)

--store

run store: finished runs are kept and reused, so a sweep can resume

--workdir

folder for run folders

--out

output folder

abmfact-sweep

--backend

local runs here; slurm writes a job array for the runs not yet in the store

local

--submit

with –backend slurm: also submit the array with sbatch

--collect

read the runs a Slurm array wrote under OUT/slurm

-q, --quiet

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

sensitivity YAML file: a sweep file with a ‘sensitivity’ section

required

--method

override the file’s method

--n

override N (Sobol base sample) or the Morris trajectories

--jobs

runs at once (overrides the file)

--store

run store: finished runs are kept and reused

--workdir

folder for run folders

--out

output folder

abmfact-sensitivity

-q, --quiet

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

calibration YAML file

required

--methods

list the calibration methods and plug-ins, and exit

--method

override the file’s method: bayesopt, abc-smc or a plug-in

--jobs

runs at once (overrides the file)

--store

run store: finished runs are kept and reused

--workdir

folder for run folders

--out

output folder

abmfact-calibration

-q, --quiet

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

target

translation YAML file, or an ABM-IR model with –to, –calibrate-on, –hold-out, –free

required

--to

the target engine

--calibrate-on

comma-separated observables the gains are fitted to

--hold-out

comma-separated observables kept out of the fit and reported

--free

a mapping gain to fit, e.g. pressure_gain=0.2:5; only pressure_gain and motility_gain

--source-engine

the source engine (default reference)

reference

--source-seeds

seeds of the source ensemble (default 20)

20

--seeds

seeds per evaluation of the target (default 10)

10

--seed-start

the first seed (default 0)

0

--method

bayesopt (default) or abc-smc

bayesopt

--param

fixed ABM-IR parameter for both engines

--option

fixed target-engine option

--jobs

runs at once

--store

run store: finished runs are kept and reused

--workdir

folder for run folders

--out

output folder

abmfact-translation

-q, --quiet

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

target

a mode’s result file or folder, a run folder, or a run id with –store

required

--store

run store to find a run id in

--out

output folder

abmfact-plots

--times

for a run: last (default), all, or comma-separated times

last

--colour

colour cells by type or state

type

--field

substrate to draw (default: every one); repeatable

--movie

also film every save time

--vtk

also write VTK files for ParaView

-q, --quiet

print only errors

Exit status: 0 when the plots or files were written; 2 when the target is not recognised.