CLI¶
usage: snap-asr-bench [-h] [--plan PLAN] [--dry-run] [--reference REFERENCE] [--manifest MANIFEST]
[--id-column ID_COLUMN] [--uri-column URI_COLUMN]
[--reference-column REFERENCE_COLUMN] [--rewrite FROM=TO]
[--where COLUMN=VALUE[,VALUE...]] [--require-reference] [--sample SAMPLE]
[--seed SEED] [--limit LIMIT] [--targets TARGETS] [--only ONLY]
[--parallel-targets] [--client-processes N|auto] [--on-host | --no-on-host]
[--remote-dir REMOTE_DIR] [--work-dir WORK_DIR] [--results-s3 RESULTS_S3]
[--run-id RUN_ID] [--chunk-seconds CHUNK_SECONDS] [--strategy STRATEGY]
[--boundary BOUNDARY] [--boundary-search-seconds BOUNDARY_SEARCH_SECONDS]
[--audio-format AUDIO_FORMAT] [--bitrate BITRATE] [--pacing PACING]
[--concurrency CONCURRENCY] [--repeats REPEATS]
[--max-window-seconds MAX_WINDOW_SECONDS] [--language LANGUAGE]
[--carry-prompt] [--temperature TEMPERATURE]
[--metrics-interval METRICS_INTERVAL]
[--journal-from {service-start,target-start}]
[--log-level {debug,info,warning,error}] [--network-samples NETWORK_SAMPLES]
[--network-payload-kib NETWORK_PAYLOAD_KIB]
[--request-timeout REQUEST_TIMEOUT] [--warmup-seconds WARMUP_SECONDS]
[--warmup-input WARMUP_INPUT] [--warmup-concurrency WARMUP_CONCURRENCY]
[input]
| Option | Default | Meaning |
|---|---|---|
--plan |
none | TOML benchmark plan holding the run's options and its jobs. Other flags override it for every job. |
--dry-run |
off | Check the options (and the plan), load the targets file, print each job's resolved settings with its loads and streams per input, and exit without staging or sending anything. |
input |
Local path or s3://bucket/key of a video or audio file. Give either this or --manifest. |
|
--reference |
none | Local path or s3://bucket/key of a reference transcript for input (plain text or JSON). Each stream is then scored. The input's clip ID is its file name without the extension, which is what an Ego4D AV transcript is matched on. |
--manifest |
none | Local path or s3://bucket/key of a manifest CSV, one row per clip, instead of input. |
--id-column |
first of clip_id, uid, id, name |
Manifest column naming each clip. |
--uri-column |
per row, first non-empty of uri, s3_uri, media_path, path |
Manifest column holding each clip's path or S3 URI. |
--reference-column |
first of reference, reference_path, transcript_path |
Manifest column holding each clip's reference transcript. A reference_text column holds the text inline. |
--rewrite |
none | FROM=TO: replace a path prefix in the media and reference columns before use. Repeatable; the first match wins. |
--where |
none | COLUMN=VALUE[,VALUE...]: keep rows whose column has one of the values. Repeatable; all must match. |
--require-reference |
off | Keep only rows with a reference. |
--sample |
none | Keep a random sample of this many rows, in manifest order. |
--seed |
0 |
Seed for --sample. |
--limit |
none | Keep at most this many rows, after the other filters. |
--targets |
required, here or as targets in the plan |
targets.toml file. |
--only |
all | Comma-separated target names. Targets run in file order, or all at once with --parallel-targets. |
--parallel-targets |
off | Run every target at once instead of one after another. The targets then share this host's CPU and network (design decision 3). |
--on-host |
off | Run each target's benchmark harness over SSH on its runner_host, or without one on its vLLM host (vllm_host, default its name), instead of here (Run a benchmark). The targets file goes with it, without the SSH host names; --only there picks the target. Only each run's events.jsonl comes back, into --work-dir. --no-on-host turns it off when a plan turns it on. |
--client-processes |
auto |
Processes that share each load's streams, each with its own asyncio loop, so a large load isn't limited to one core. auto is one per CPU of the host running the load (with --on-host, each runner counts its own), and a load never uses more processes than streams (Concurrent load). |
--remote-dir |
snap-asr-bench |
The repository on each host, for --on-host, relative to the SSH user's home. |
--work-dir |
/mnt/nvme/snap-asr-bench |
Instance-store directory for inputs, extracted audio and run logs. Also set by SNAP_ASR_BENCH_WORK_DIR. With --on-host, the local directory each host's events.jsonl is copied into, as runs/<run-id>-<target>/. |
--results-s3 |
none | s3://bucket/prefix. The run's JSONL goes to <prefix>/<run-id>/events.jsonl. |
--run-id |
<UTC timestamp>-<6 hex>, then -<plan name> with --plan |
Names the run directory and S3 prefix. The plan name is the plan's file name without .toml, so a run's directory says which plan made it. |
--chunk-seconds |
2 |
Comma-separated list of chunk lengths to sweep. |
--strategy |
independent |
independent, growing or both. See Chunk planning. |
--boundary |
fixed |
fixed, silence or both. See Chunk planning. |
--boundary-search-seconds |
0.5 |
How far back a silence boundary may move a cut. |
--audio-format |
wav |
Comma-separated upload formats to sweep: wav, flac, aac, opus, mp3. See Encoding. |
--bitrate |
64k |
ffmpeg bitrate for aac, opus and mp3. |
--pacing |
realtime |
realtime, afap or both. See Pacing. |
--concurrency |
1 |
Comma-separated numbers of streams to run at once, swept like the other lists. Each stream is a speaker replaying the current input clip from a different point; only speaker 0 is scored for WER. See Concurrent load. |
--repeats |
1 |
Times to repeat each configuration. At least 1. |
--max-window-seconds |
30 |
Most audio a growing request sends. |
--language |
en |
ISO 639-1 code sent as the language form field (vLLM rejects names like English). auto sends none, so the model detects the language per chunk. |
--carry-prompt |
off | Send the previous chunk's text as prompt (independent only). |
--temperature |
0.0 |
Sampling temperature. |
--metrics-interval |
1.0 |
Seconds between /metrics scrapes. |
--journal-from |
service-start |
service-start streams the current vllm.service run from its start, start-up logs included; on a host with the journald cap (installed by the vLLM install targets), that reaches back at most 2 days. target-start streams from when the client reaches the target. |
--log-level |
info |
The lowest level of vLLM journal line to log: debug, info, warning or error. At info, vLLM's per-request lines (Received request, Added request, successful HTTP access lines, and trn2's encoder-cache lines) are left out; start-up lines and warnings stay. debug logs every line. journald errors are always logged. |
--network-samples |
20 |
Samples per network baseline probe. 0 skips the baseline. |
--network-payload-kib |
16,64,256,1024 |
Upload sizes for the network baseline. |
--request-timeout |
120 |
httpx timeout in seconds for each connect, read, write and pool wait. Not a total per request. Each transcription request uses its job's value. The other HTTP calls to the targets and sidecars use the largest value of any job. |
--warmup-seconds |
0 |
Minimum warm-up time per target. 0 skips warm-up. Needs --warmup-input. |
--warmup-input |
none | Local path or s3://bucket/key of the warm-up audio. Must differ from every measured input and be at least as long as the longest --chunk-seconds. Needs --warmup-seconds above 0. |
--warmup-concurrency |
4 |
Warm-up streams run in parallel, so every DP rank gets traffic. |
The full command line is recorded in run_start.argv, and the resolved
options in run_start.options (each job's sweep and request options under
jobs), so any run can be repeated from its own JSONL.
Benchmark plans¶
A plan file holds every option of a run, so a benchmark can be named,
reviewed and repeated. The format and its rules are in
Benchmark plans, and
resources/examples/plans/platform-comparison.toml is a full example.
| Section | Keys |
|---|---|
[run] |
Run-level options, set once per run: targets, only, parallel-targets, on-host, remote-dir, work-dir, results-s3, run-id, metrics-interval, journal-from, log-level, network-samples, network-payload-kib, warmup-seconds, warmup-input, warmup-concurrency |
[defaults] |
Job options every job starts from: the inputs (input, reference, manifest, id-column, uri-column, reference-column, rewrite, where, require-reference, sample, seed, limit), chunk-seconds, strategy, boundary, boundary-search-seconds, audio-format, bitrate, pacing, concurrency, repeats, max-window-seconds, language, carry-prompt, temperature, request-timeout, and only: the targets the job runs on (Targets per job; --only doesn't replace it) |
[[job]] |
name (required, unique), and any job options, which replace the same keys in [defaults]. |
snap-asr-bench --plan resources/examples/plans/platform-comparison.toml --dry-run
snap-asr-bench --plan resources/examples/plans/platform-comparison.toml --repeats 1 --only g4dn
snap-asr-bench-score¶
usage: snap-asr-bench-score [-h] [--by BY] [--csv CSV] [--streams-csv STREAMS_CSV]
events [events ...]
Scores the measured streams of one or more runs against the reference
transcripts recorded in their input_ready events. See
Accuracy (WER).
| Option | Default | Meaning |
|---|---|---|
events |
One or more events.jsonl files. |
|
--by |
target,strategy,boundary,audio_format,pacing,chunk_seconds |
Fields to group by: any stream_end field or manifest column. |
--csv |
none | Write the grouped table to this file. |
--streams-csv |
none | Write one row per scored stream to this file. |
It exits 1 if no measured stream has a reference.