nvflare job
nvflare job submits and manages jobs on a running NVIDIA FLARE system through an admin startup kit. It is designed for both humans and automation: every subcommand supports --format json, --schema, --study, and the per-command startup-kit selectors described in CLI Overview.
| Subcommand | Purpose |
|---|---|
submit |
Submit a job folder. |
wait |
Block until a job finishes; one final envelope. |
monitor |
Block with streaming progress. |
list |
List jobs. |
meta |
Job metadata. |
download |
Download results. |
abort, delete |
Stop or remove a job. |
clone |
Deprecated copy of a job. |
logs |
Server-stored job logs. |
log-config |
Change logging in a running job. |
stats |
Running job statistics. |
Before using these commands, run nvflare poc prepare or activate a kit:
nvflare config add project_admin /path/to/[email protected]
nvflare config use project_admin
nvflare job submit
nvflare job submit -j /tmp/nvflare/jobs/hello-pt
nvflare job submit -j ./my_job --study cancer_research
nvflare job submit -j ./my_job --startup-kit /path/to/[email protected]
| Option | Default | Description |
|---|---|---|
-j, --job_folder |
./current_job |
Job folder to submit. |
--study |
default |
Target study. |
--submit-token |
— | Caller-generated retry token (see below). |
-debug, --debug |
off | Keep the temporary copied job folder for inspection. |
Submit returns immediately with the job ID; it does not wait. To change configuration, edit the exported job files first: submit-time -f/--config_file overrides are not supported. Create the folder with python job.py --export --export-dir <dir>.
Retry-safe submit tokens
A plain submit retried after a network timeout can create duplicate jobs. With --submit-token, retries are idempotent:
TOKEN=$(uuidgen)
nvflare job submit -j ./my_job --study cancer_research --submit-token "$TOKEN" --format json
# after a timeout or lost connection:
nvflare job list --study cancer_research --submit-token "$TOKEN" --format json
Rules:
- Tokens are 1-128 characters of letters, numbers,
.,_,:, or-. NVFLARE never generates one for you. - Scope is server/project, study, submitter, and token. The same token with the same content returns the existing job ID; with different content it fails with
SUBMIT_TOKEN_CONFLICT. - If the job was deleted, reuse returns
SUBMIT_TOKEN_JOB_DELETED(exit 4) instead of recreating it. Use a new token. - A zip with a single wrapper directory hashes the same as the directory itself; submitting the parent directory is different content.
- The token is stored as server metadata, not in the job's
meta.json. It is not an authentication credential.
nvflare job wait
nvflare job wait <job_id>
nvflare job wait <job_id> --timeout 3600 --interval 5 --format json
| Option | Default | Description |
|---|---|---|
job_id |
required | Job to wait for. |
--timeout |
0 (none) |
Maximum seconds; must be >= 0. |
--interval |
2 |
Poll interval in seconds; must be > 0. |
--study |
default |
Study used at submission. |
It prints no progress lines. Exit codes: 0 success, 1 terminal failure (FAILED, FINISHED_EXCEPTION, ABORTED, ABANDONED), 2 connection or auth failure, 3 timeout. This enables chaining:
JOB=$(nvflare job submit -j ./my_job --format json | jq -r .data.job_id)
nvflare job wait $JOB --format json && nvflare job download $JOB
nvflare job monitor
Like wait, but streams status lines to stderr while waiting. It has the same options and exit codes, plus:
| Option | Default | Description |
|---|---|---|
--stats-target |
server |
server, client, or all. |
--metric |
— | Extra metric key to surface; repeatable. |
monitor is the only command that accepts --format jsonl. Each stdout line is one JSON object; progress events carry terminal: false and the last event terminal: true. Successful statuses such as FINISHED_OK are normalized to status: "COMPLETED" with the raw value in job_status; a timeout emits status: "TIMEOUT" and exits 3.
{"schema_version":"1","event":"terminal","job_id":"abc123","status":"COMPLETED","job_status":"FINISHED_OK","terminal":true}
nvflare job list
| Option | Description |
|---|---|
-n, --name |
Job name prefix. |
-i, --id |
Job ID prefix. |
-r, --reverse |
Reverse order. |
-m, --max |
Maximum results. |
--study |
Study (default default; values such as all are passed to the server unchanged). |
--submit-token |
Find the job created with this token. |
nvflare job meta
nvflare job meta <job_id> [--study S] prints a concise summary in text mode; --format json returns the full raw metadata. If a job is not found, the error names the study that was searched and suggests --study.
nvflare job download
nvflare job download <job_id> -o ./downloads
nvflare job download <job_id> --force --format json
| Option | Default | Description |
|---|---|---|
-o, --output-dir |
./<job_id> |
Destination. |
--force |
off | Replace an existing destination. |
--study |
default |
Study. |
The job must be in a terminal state, so run job wait first. JSON output includes download_path (and its alias path), artifact_discovery, artifacts (for example global_model, metrics_summary, round_metrics, client_logs), and missing_artifacts. Use data.artifacts.* rather than constructing paths yourself. Missing artifacts do not fail the command.
The global model is located only in server-owned locations (workspace, server, app_server), never in client checkpoints. If your job saves it under a custom name, add an artifact_manifest.json in a server-owned location:
{"schema_version": "1", "artifacts": {"global_model": "app_server/production-checkpoint.bin"}}
A manifest is authoritative: if it is invalid or its target is missing, the CLI does not fall back to guessing. Paths must stay inside the download and cannot traverse symlinks.
nvflare job abort and delete
nvflare job abort <job_id> [--study S] [--force]
nvflare job delete <job_id> [--study S] [--force]
--force skips the confirmation prompt (required when stdin is not interactive). delete --format json reports submit_records_marked_deleted.
nvflare job clone (deprecated)
Deprecated since 2.10.0. It copies the stored job including the original signatures and submitter certificate, which are not renewed, so a clone can fail once the original certificate expires. Resubmit the original job folder instead (nvflare job submit -j JOB_FOLDER). If you no longer have it, download the finished job and resubmit the job definition extracted from its job.zip.
nvflare job logs
nvflare job logs <job_id>
nvflare job logs <job_id> --site all --tail 200
nvflare job logs <job_id> --site site-1 --since 2026-04-28T10:00:00
| Option | Default | Description |
|---|---|---|
--site (alias --sites) |
server |
server, a client name, or all. |
--tail N |
500 lines | Last N lines per site. |
--since TIMESTAMP |
— | Lines at or after the timestamp (continuation lines included). |
--max-bytes N |
— | At most N UTF-8 bytes per site. |
--study |
default |
Study. |
The default 500-line tail applies only when none of --tail, --since, or --max-bytes is given; explicit bounds apply in the order --since, --tail, --max-bytes. Bounds are applied by the CLI after the server returns the logs, so they do not reduce what is transferred.
Client logs are not fetched from client machines. Only logs already streamed to the server are available, so enable streaming in the job with recipe.enable_log_streaming() (see the hello-log-streaming example). JSON mode prefers log.json and falls back to log.txt. There is no built-in grep; pipe the output.
nvflare job log-config
nvflare job log-config <job_id> DEBUG
nvflare job log-config <job_id> progress --site site-1
The positional level accepts DEBUG, INFO, WARNING, ERROR, CRITICAL, or a mode: concise, progress, msg_only, full, verbose, reload. --site defaults to all.
nvflare job stats
nvflare job stats <job_id> [--site all|<name>] [--study S] shows statistics of a running job.