Skip to content

Commit 18140ca

Browse files
committed
feat(jobs): add watch command to stream job events
Signed-off-by: Ryan S <267728323+ironcommit@users.noreply.github.com>
1 parent 607acde commit 18140ca

39 files changed

Lines changed: 5035 additions & 418 deletions

File tree

docs/cli/reference.mdx

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2019,15 +2019,16 @@ nemo inference deployments create [OPTIONS] [NAME]
20192019
* `--input-file`: Path to JSON file (use '-' for stdin)
20202020
* `--input-data`: Input data for the request (JSON or YAML)
20212021

2022-
**Output Options:**
2022+
**Lifecycle Options:**
20232023

2024-
* `--output-format, -f <CHOICE>`: Output format for an entity. [possible values: json, yaml, raw, code]
2024+
* `--wait`: Wait for the created deployment to be up and running
2025+
* `--watch`: Watch the created deployment until it is stable, streaming status updates
2026+
* `--timeout <INTEGER RANGE>`: Maximum time to wait or watch in seconds [default: 1200]
2027+
* `--poll-interval <INTEGER RANGE>`: Seconds between status checks [default: 3]
20252028

2026-
**Wait Options:**
2029+
**Output Options:**
20272030

2028-
* `--wait`: Wait for the created deployment to reach a terminal state
2029-
* `--timeout <INTEGER RANGE>`: Maximum time to wait in seconds [default: 1200]
2030-
* `--poll-interval <INTEGER RANGE>`: Seconds between status checks [default: 3]
2031+
* `--output-format, -f <CHOICE>`: Output format for an entity. [possible values: json, yaml, raw, code]
20312032

20322033
##### nemo inference deployments delete
20332034

@@ -3814,6 +3815,7 @@ nemo jobs [OPTIONS] COMMAND [ARGS]...
38143815
* `resume`: Resume a paused platform job.
38153816
* `get`: Get a platform job by name.
38163817
* `update-status-details`: Update the status details of a platform job.
3818+
* `watch`: Watch a platform job until it reaches a terminal status.
38173819
* `results`: Manage results
38183820
* `steps`: Manage steps
38193821
* `tasks`: Manage tasks
@@ -3890,6 +3892,13 @@ nemo jobs create [OPTIONS] [NAME]
38903892
* `--input-file`: Path to JSON file (use '-' for stdin)
38913893
* `--input-data`: Input data for the request (JSON or YAML)
38923894

3895+
**Lifecycle Options:**
3896+
3897+
* `--wait`: Wait for the created job to reach a terminal state without streaming logs
3898+
* `--watch`: Watch the created job to a terminal state
3899+
* `--timeout <INTEGER RANGE>`: Maximum time to wait or watch in seconds
3900+
* `--poll-interval <INTEGER RANGE>`: Seconds between status checks [default: 3]
3901+
38933902
**Output Options:**
38943903

38953904
* `--output-format, -f <CHOICE>`: Output format for an entity. [possible values: json, yaml, raw, code]
@@ -4159,6 +4168,35 @@ nemo jobs update-status-details [OPTIONS] NAME
41594168

41604169
* `--output-format, -f <CHOICE>`: Output format for an entity. [possible values: json, yaml, raw, code]
41614170

4171+
#### nemo jobs watch
4172+
4173+
Watch a platform job until it reaches a terminal status.
4174+
4175+
**Usage:**
4176+
4177+
```shell
4178+
nemo jobs watch [OPTIONS] NAME
4179+
```
4180+
4181+
**Arguments:**
4182+
4183+
* `<NAME>`: Name of the platform job to watch
4184+
4185+
**Options:**
4186+
4187+
* `--workspace`: Workspace containing the job
4188+
* `--attempt-id <INTEGER>`: Filter logs to an attempt ID
4189+
* `--step-id`: Filter logs to a step ID
4190+
* `--task-id`: Filter logs to a task ID
4191+
* `--limit <INTEGER RANGE>`: Maximum logs to fetch per page
4192+
* `--timeout <INTEGER RANGE>`: Maximum watch time in seconds
4193+
* `--poll-interval <INTEGER RANGE>`: Seconds between status checks [default: 3]
4194+
* `--history, --no-history`: Include logs already present before watching
4195+
4196+
**Help:**
4197+
4198+
* `--help, -h`: Show this message and exit.
4199+
41624200
#### nemo jobs results
41634201

41644202
Manage results

packages/nemo_platform_ext/src/nemo_platform_ext/cli/commands/api/inference/deployments/__init__.py

Lines changed: 24 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/nemo_platform_ext/src/nemo_platform_ext/cli/commands/api/jobs/__init__.py

Lines changed: 115 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)