Skip to content

cli

The command line of simrun: submit, follow and compare runs.

Every command prints the detail of a refusal of the service to stderr and exits 1; --json prints machine-readable JSON instead of tables.

make_client

make_client()

The client of the environment (SIMRUN_URL, SIMRUN_TOKEN, SIMRUN_STORE).

submit

submit(
    workflow,
    source=None,
    group=None,
    single_server=False,
    reserve=None,
    local=False,
    docker=False,
    snapshot=False,
    wait_=None,
    timeout=None,
    as_json=False,
)

Snapshot the sources and submit a workflow.

wait

wait(run, timeout=None, local=False, as_json=False)

Wait for a run to end; exit 0 if it succeeded, 1 if not, 2 on timeout.

outputs

outputs(run, task, to=None, local=False, as_json=False)

List the output files of a task, or extract them with --to.

status

status(run, local=False, as_json=False)

Show the state of a run and its tasks.

list_

list_(
    group=None,
    agent=None,
    state=None,
    owner=None,
    local=False,
    as_json=False,
)

List runs.

compare

compare(runs, local=False, as_json=False)

Compare the provenance and the summaries of runs.

cancel

cancel(run, local=False, as_json=False)

Cancel a run.

logs

logs(run, task, tail=DEFAULT_TAIL_LINES, local=False)

Print the logs of the pods of a task.

estimate

estimate(
    workflow,
    source=None,
    single_server=False,
    reserve=None,
    local=False,
    as_json=False,
)

Show the plan and the expected duration of every task of a submission.

cleanup

cleanup(
    older_than=30,
    group=None,
    failed=False,
    dry_run=False,
    local=False,
    as_json=False,
)

Remove ended runs and the snapshots nothing refers to.

edit

edit(
    workflow,
    source=None,
    group=None,
    local=False,
    snapshot=False,
)

Serve the Editor of the web app for a workflow file until stopped.

Saves of the browser are written into the file, a run snapshots the sources again. A missing file is a new workflow. Ctrl-C closes the session and exits, a second Ctrl-C exits without waiting for the close. With --local the session is on the local service of the current directory.

usage

usage(local=False, as_json=False)

Show the bytes of the store per group and run.

serve

serve(
    local=False,
    port=None,
    host="127.0.0.1",
    idle_exit=None,
    stop=False,
)

Run the service until stopped.

With --local the service of the current directory with the local backend: the tasks run as processes on this machine, Ctrl-C cancels the runs; exit 3 when the service of the directory runs already. --stop stops it instead. Without, the service of the settings named by SIMRUN_CONFIG, as uvicorn --factory simrun.service.app:serve runs it.