hmp campaign#

$ hmp campaign [-h] <action> ...

Run a project of many cases, collect it, keep what a calibration found

CommandWhat it does
hmp campaign arrayWrite the array job of the current plan for a scheduler (SLURM)
hmp campaign casePrint the case file of task N of a job (jobs/<job>/cases.txt, task 1 first)
hmp campaign collectWrite summary/ of a project: tables by case and by site, map, figures, exports
hmp campaign promotePromote one trial of a calibration session to a run under runs/
hmp campaign pruneMove the kept trials of a calibration session to the trash, all but the best

hmp campaign array#

$ hmp campaign array [-h] [-w WORKSPACE] [--format {table,json,csv}] [--verbosity {quiet,normal,verbose,debug} | -q | -v | --debug] --scheduler {slurm} [--partition PARTITION] [--time WALLTIME] [--threads-per-case THREADS_PER_CASE] [--prepare-parallel PREPARE_PARALLEL] [--credentials PATH] [--allow-host HOST] [--max-download-bytes N] [project]

Write the array job of the current plan for a scheduler (SLURM)

ArgumentWhat it does
projectProject directory, or its project.toml (default: -w, else the current directory)
--scheduler SCHEDULERScheduler the job scripts are written for one of slurm · required
--partition PARTITIONSLURM partition of both arrays
--time WALLTIMEWalltime of one task (M, H:M:S, D-H:M:S); longer than the 600 s warning
--threads-per-case THREADS_PER_CASEThreads of one case (default: [sites.run] threads_per_case)
--prepare-parallel PREPARE_PARALLELCases prepared side by side (default: [sites.run] prepare_parallel)

Also takes the shared options --workspace --format --verbosity --quiet --verbose --debug --credentials --allow-host --max-download-bytes.

Examples

$ hmp campaign array . --scheduler slurm
$ hmp campaign array . --scheduler slurm --partition normal --time 12:00:00

Writes jobs/<stamp>-slurm/{prepare.sh, array.sh, cases.txt} once, from the plan written by `hmp project plan`. Not verified on a cluster yet.

An exception it does not catch ends with the code of its class. All exit codes.

hmp campaign case#

$ hmp campaign case [-h] [--format {table,json,csv}] [--verbosity {quiet,normal,verbose,debug} | -q | -v | --debug] [-w WORKSPACE] job task

Print the case file of task N of a job (jobs/<job>/cases.txt, task 1 first)

ArgumentWhat it does
jobFolder under jobs/, or its path
taskTask number, 1 for the first line of cases.txt

Also takes the shared options --format --verbosity --quiet --verbose --debug --workspace.

Example

$ hmp campaign case 20261020-143000-slurm 3 -w .

Exit codes it sets itself: 2. All exit codes.

hmp campaign collect#

$ hmp campaign collect [-h] [-w WORKSPACE] [--format {table,json,csv}] [--verbosity {quiet,normal,verbose,debug} | -q | -v | --debug] [--write-sites] [--mixed-windows] [project]

Write summary/ of a project: tables by case and by site, map, figures, exports

ArgumentWhat it does
projectProject directory, or a folder inside it (default: -w, else the current directory)
--write-sitesAlso write summary/catalog.csv, the sites as a site table (SiteRow columns)
--mixed-windowsRank scores computed on different windows or rules together

Also takes the shared options --workspace --format --verbosity --quiet --verbose --debug.

Examples

$ hmp campaign collect
$ hmp campaign collect projects/bretagne_k --write-sites
$ hmp campaign collect . --mixed-windows

hmp campaign promote#

$ hmp campaign promote [-h] [-w WORKSPACE] [--format {table,json,csv}] [--verbosity {quiet,normal,verbose,debug} | -q | -v | --debug] [--trial N] [--name NAME] case

Promote one trial of a calibration session to a run under runs/

ArgumentWhat it does
caseCase of the session, <case> or <case>_vN
--trial NTrial number, as trials.jsonl of the session lists it (default: list the best)
--name NAMERun name to take (default: the case, paired with the session when free)

Also takes the shared options --workspace --format --verbosity --quiet --verbose --debug.

The case names the session: sessions/<case>[_vN].

Examples

$ hmp campaign promote calibration
$ hmp campaign promote calibration --trial 12
$ hmp campaign promote J0014010-calage --trial 4 --name k_high -w projects/bretagne

Exit codes it sets itself: 10. All exit codes.

hmp campaign prune#

$ hmp campaign prune [-h] [-w WORKSPACE] [-y] [--dry-run] [--format {table,json,csv}] [--verbosity {quiet,normal,verbose,debug} | -q | -v | --debug] [--keep {best}] case

Move the kept trials of a calibration session to the trash, all but the best

ArgumentWhat it does
caseCase of the session, <case> or <case>_vN
--keep KEEPTrials left in place (default: best, the trial session.json points at) one of best

Also takes the shared options --workspace --yes --dry-run --format --verbosity --quiet --verbose --debug.

Examples

$ hmp campaign prune calibration --keep best -y
$ hmp campaign prune calibration --dry-run
$ hmp campaign prune J0014010-calage -w projects/bretagne -y

Exit codes it sets itself: 2 10 130. All exit codes.