nufi-python 1.1.2__tar.gz → 1.1.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. {nufi_python-1.1.2/src/nufi_python.egg-info → nufi_python-1.1.3}/PKG-INFO +27 -25
  2. {nufi_python-1.1.2 → nufi_python-1.1.3}/README.md +26 -24
  3. {nufi_python-1.1.2 → nufi_python-1.1.3}/pyproject.toml +1 -1
  4. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/auth.py +6 -6
  5. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/cli/commands/auth.py +13 -7
  6. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/cli/commands/common.py +12 -5
  7. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/cli/commands/compiles.py +28 -18
  8. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/cli/commands/custom_evaluation_templates.py +17 -9
  9. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/cli/commands/datasets.py +56 -30
  10. nufi_python-1.1.3/src/nufi/cli/commands/doctor.py +415 -0
  11. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/cli/commands/evaluations.py +64 -30
  12. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/cli/commands/leaderboards.py +24 -17
  13. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/cli/commands/models.py +49 -46
  14. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/cli/commands/monitoring.py +9 -3
  15. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/cli/commands/profile.py +11 -5
  16. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/cli/commands/projects.py +35 -19
  17. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/cli/commands/servings.py +18 -8
  18. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/cli/main.py +2 -0
  19. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/client.py +1 -1
  20. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/config.py +10 -8
  21. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/evaluator.py +139 -27
  22. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/exceptions.py +1 -1
  23. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/models/__init__.py +4 -0
  24. nufi_python-1.1.3/src/nufi/models/custom_evaluation_templates.py +324 -0
  25. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/models/evaluations.py +12 -1
  26. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/models/registry.py +3 -3
  27. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/resources/compiles.py +4 -4
  28. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/resources/datasets.py +1 -1
  29. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/resources/leaderboards.py +6 -6
  30. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/resources/models.py +9 -9
  31. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/resources/projects.py +2 -2
  32. {nufi_python-1.1.2 → nufi_python-1.1.3/src/nufi_python.egg-info}/PKG-INFO +27 -25
  33. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi_python.egg-info/SOURCES.txt +1 -0
  34. nufi_python-1.1.2/src/nufi/models/custom_evaluation_templates.py +0 -111
  35. {nufi_python-1.1.2 → nufi_python-1.1.3}/LICENSE +0 -0
  36. {nufi_python-1.1.2 → nufi_python-1.1.3}/setup.cfg +0 -0
  37. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/__init__.py +0 -0
  38. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/cli/__init__.py +0 -0
  39. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/cli/commands/__init__.py +0 -0
  40. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/http_utils.py +0 -0
  41. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/models/compiles.py +0 -0
  42. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/models/datasets.py +0 -0
  43. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/models/leaderboards.py +0 -0
  44. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/models/monitoring.py +0 -0
  45. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/models/pagination.py +0 -0
  46. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/models/projects.py +0 -0
  47. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/models/servings.py +0 -0
  48. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/py.typed +0 -0
  49. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/resources/__init__.py +0 -0
  50. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/resources/base.py +0 -0
  51. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/resources/custom_evaluation_templates.py +0 -0
  52. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/resources/evaluations.py +0 -0
  53. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/resources/monitoring.py +0 -0
  54. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/resources/servings.py +0 -0
  55. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi/transport.py +0 -0
  56. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi_python.egg-info/dependency_links.txt +0 -0
  57. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi_python.egg-info/entry_points.txt +0 -0
  58. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi_python.egg-info/requires.txt +0 -0
  59. {nufi_python-1.1.2 → nufi_python-1.1.3}/src/nufi_python.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nufi-python
3
- Version: 1.1.2
3
+ Version: 1.1.3
4
4
  Summary: Python SDK and CLI for the NuFi platform.
5
5
  Author: Dudaji Inc.
6
6
  License-Expression: MIT
@@ -42,8 +42,8 @@ python -m pip install "nufi-python[evaluator]"
42
42
 
43
43
  ## Configure access
44
44
 
45
- Ask your NuFi administrator for the installation's base domain and a project you can
46
- access. Create a profile, log in, and select the project once:
45
+ Ask your NuFi Administrator for the installation's base domain and a Project you can
46
+ access. Create a CLI Profile, log in, and select the project once:
47
47
 
48
48
  ```bash
49
49
  nufi profile create production --base-domain nufi.example
@@ -114,10 +114,10 @@ with NuFi.from_profile() as client:
114
114
  entries = client.leaderboards.entries(leaderboard.id)
115
115
  ```
116
116
 
117
- ## Evaluations
117
+ ## Model Evaluation
118
118
 
119
- Dataset import completion and Dataset profile completion are separate asynchronous
120
- steps. Wait for the profile before previewing or creating an Evaluation Method:
119
+ Dataset import and Dataset Profiling complete independently. Wait for the Dataset
120
+ Profile before previewing or creating an Evaluation Method:
121
121
 
122
122
  ```bash
123
123
  nufi dataset version create mmlu mmlu-aa-test --source huggingface \
@@ -126,8 +126,8 @@ nufi dataset version profile mmlu mmlu-aa-test --wait --output json
126
126
  ```
127
127
 
128
128
  The SDK uses the import result's `dataset_version_id` for the same workflow. A failed
129
- profile is returned as a terminal object so the caller can report its server error
130
- without sending an Evaluation Method request:
129
+ Dataset Profile is returned as a terminal object so the caller can report its server
130
+ error without sending an Evaluation Method request:
131
131
 
132
132
  ```python
133
133
  from nufi import NuFi
@@ -148,7 +148,7 @@ if not imported.dataset_version_id:
148
148
  version_id = imported.dataset_version_id
149
149
  profile = client.datasets.versions.wait_for_profile(dataset_id, version_id)
150
150
  if profile.status != "ready":
151
- raise RuntimeError(profile.error or "Dataset profile failed")
151
+ raise RuntimeError(profile.error or "Dataset Profiling failed")
152
152
 
153
153
  config = {
154
154
  "schemaVersion": "nufi.evaluation.method.v2",
@@ -174,17 +174,17 @@ method = client.evaluations.methods.create(
174
174
  client.close()
175
175
  ```
176
176
 
177
- Evaluation Method metadata is unconditional and v2-only. Method config is owned and
178
- validated by the API; the SDK forwards the mapping and any caller-supplied Method type
179
- without a client-side allowlist.
177
+ Evaluation Method metadata is unconditional and v2-only. Evaluation Method config is
178
+ owned and validated by the API; the SDK forwards the mapping and any caller-supplied
179
+ Evaluation Method type without a client-side allowlist.
180
180
 
181
- The `nufi.evaluator.run` helper exits non-zero when evaluation or result submission
182
- fails. NuFi determines Run success from Job success and durable API acceptance;
183
- evaluator output is diagnostic only.
181
+ The `nufi.evaluator.run` helper exits non-zero when an Evaluation Run or result
182
+ submission fails. NuFi determines Evaluation Run success from Kubernetes Job success
183
+ and durable API acceptance; evaluator output is diagnostic only.
184
184
 
185
185
  `evaluation method templates` currently exposes lm-eval templates, metrics, and
186
- filters. It is an optional discovery command and is not needed when you already have a
187
- Method config.
186
+ filters. It is an optional discovery command and is not needed when you already have an
187
+ Evaluation Method configuration.
188
188
 
189
189
  ```python
190
190
  from nufi import NuFi
@@ -224,8 +224,9 @@ client.evaluations.cancel(run.id, project=project)
224
224
  client.close()
225
225
  ```
226
226
 
227
- The CLI accepts Dataset, Dataset Version, and Evaluation Method names or UUIDs. Run
228
- arguments remain UUIDs because Runs have no name. Select a Model Artifact with
227
+ The CLI accepts Dataset, Dataset Version, and Evaluation Method names or UUIDs.
228
+ Evaluation Run arguments remain UUIDs because Evaluation Runs have no name. Select a
229
+ Model Artifact with
229
230
  `--model`, `--model-version`, and `--artifact`; `--model-artifact-id` remains available
230
231
  for automation. Config, default-runtime, and runner-config files may be JSON or YAML
231
232
  and must have a mapping at the document root.
@@ -263,10 +264,11 @@ nufi evaluation run get RUN_ID --project team-a
263
264
  nufi evaluation run cancel RUN_ID --yes --project team-a
264
265
  ```
265
266
 
266
- Run creation defaults to `--cpu 4`, `--memory 8Gi`, and `--accelerator-count 1`;
267
- pass any option to override its default.
267
+ Evaluation Run creation defaults to `--cpu 4`, `--memory 8Gi`, and
268
+ `--accelerator-count 1`; pass any option to override its default.
268
269
 
269
- Run detail table output shows aggregate and diagnostic summaries only. Use explicit
270
- `--output json` to include the authorized bounded diagnostic input, output, reference,
271
- score, and error fields returned by the API. Additive response fields are preserved;
272
- legacy Method/Run responses missing required v2 fields are rejected.
270
+ Evaluation Run detail table output shows aggregate and diagnostic summaries only. Use
271
+ explicit `--output json` to include the authorized bounded diagnostic input, output,
272
+ reference, score, and error fields returned by the API. Additive response fields are
273
+ preserved; legacy Evaluation Method/Evaluation Run responses missing required v2
274
+ fields are rejected.
@@ -20,8 +20,8 @@ python -m pip install "nufi-python[evaluator]"
20
20
 
21
21
  ## Configure access
22
22
 
23
- Ask your NuFi administrator for the installation's base domain and a project you can
24
- access. Create a profile, log in, and select the project once:
23
+ Ask your NuFi Administrator for the installation's base domain and a Project you can
24
+ access. Create a CLI Profile, log in, and select the project once:
25
25
 
26
26
  ```bash
27
27
  nufi profile create production --base-domain nufi.example
@@ -92,10 +92,10 @@ with NuFi.from_profile() as client:
92
92
  entries = client.leaderboards.entries(leaderboard.id)
93
93
  ```
94
94
 
95
- ## Evaluations
95
+ ## Model Evaluation
96
96
 
97
- Dataset import completion and Dataset profile completion are separate asynchronous
98
- steps. Wait for the profile before previewing or creating an Evaluation Method:
97
+ Dataset import and Dataset Profiling complete independently. Wait for the Dataset
98
+ Profile before previewing or creating an Evaluation Method:
99
99
 
100
100
  ```bash
101
101
  nufi dataset version create mmlu mmlu-aa-test --source huggingface \
@@ -104,8 +104,8 @@ nufi dataset version profile mmlu mmlu-aa-test --wait --output json
104
104
  ```
105
105
 
106
106
  The SDK uses the import result's `dataset_version_id` for the same workflow. A failed
107
- profile is returned as a terminal object so the caller can report its server error
108
- without sending an Evaluation Method request:
107
+ Dataset Profile is returned as a terminal object so the caller can report its server
108
+ error without sending an Evaluation Method request:
109
109
 
110
110
  ```python
111
111
  from nufi import NuFi
@@ -126,7 +126,7 @@ if not imported.dataset_version_id:
126
126
  version_id = imported.dataset_version_id
127
127
  profile = client.datasets.versions.wait_for_profile(dataset_id, version_id)
128
128
  if profile.status != "ready":
129
- raise RuntimeError(profile.error or "Dataset profile failed")
129
+ raise RuntimeError(profile.error or "Dataset Profiling failed")
130
130
 
131
131
  config = {
132
132
  "schemaVersion": "nufi.evaluation.method.v2",
@@ -152,17 +152,17 @@ method = client.evaluations.methods.create(
152
152
  client.close()
153
153
  ```
154
154
 
155
- Evaluation Method metadata is unconditional and v2-only. Method config is owned and
156
- validated by the API; the SDK forwards the mapping and any caller-supplied Method type
157
- without a client-side allowlist.
155
+ Evaluation Method metadata is unconditional and v2-only. Evaluation Method config is
156
+ owned and validated by the API; the SDK forwards the mapping and any caller-supplied
157
+ Evaluation Method type without a client-side allowlist.
158
158
 
159
- The `nufi.evaluator.run` helper exits non-zero when evaluation or result submission
160
- fails. NuFi determines Run success from Job success and durable API acceptance;
161
- evaluator output is diagnostic only.
159
+ The `nufi.evaluator.run` helper exits non-zero when an Evaluation Run or result
160
+ submission fails. NuFi determines Evaluation Run success from Kubernetes Job success
161
+ and durable API acceptance; evaluator output is diagnostic only.
162
162
 
163
163
  `evaluation method templates` currently exposes lm-eval templates, metrics, and
164
- filters. It is an optional discovery command and is not needed when you already have a
165
- Method config.
164
+ filters. It is an optional discovery command and is not needed when you already have an
165
+ Evaluation Method configuration.
166
166
 
167
167
  ```python
168
168
  from nufi import NuFi
@@ -202,8 +202,9 @@ client.evaluations.cancel(run.id, project=project)
202
202
  client.close()
203
203
  ```
204
204
 
205
- The CLI accepts Dataset, Dataset Version, and Evaluation Method names or UUIDs. Run
206
- arguments remain UUIDs because Runs have no name. Select a Model Artifact with
205
+ The CLI accepts Dataset, Dataset Version, and Evaluation Method names or UUIDs.
206
+ Evaluation Run arguments remain UUIDs because Evaluation Runs have no name. Select a
207
+ Model Artifact with
207
208
  `--model`, `--model-version`, and `--artifact`; `--model-artifact-id` remains available
208
209
  for automation. Config, default-runtime, and runner-config files may be JSON or YAML
209
210
  and must have a mapping at the document root.
@@ -241,10 +242,11 @@ nufi evaluation run get RUN_ID --project team-a
241
242
  nufi evaluation run cancel RUN_ID --yes --project team-a
242
243
  ```
243
244
 
244
- Run creation defaults to `--cpu 4`, `--memory 8Gi`, and `--accelerator-count 1`;
245
- pass any option to override its default.
245
+ Evaluation Run creation defaults to `--cpu 4`, `--memory 8Gi`, and
246
+ `--accelerator-count 1`; pass any option to override its default.
246
247
 
247
- Run detail table output shows aggregate and diagnostic summaries only. Use explicit
248
- `--output json` to include the authorized bounded diagnostic input, output, reference,
249
- score, and error fields returned by the API. Additive response fields are preserved;
250
- legacy Method/Run responses missing required v2 fields are rejected.
248
+ Evaluation Run detail table output shows aggregate and diagnostic summaries only. Use
249
+ explicit `--output json` to include the authorized bounded diagnostic input, output,
250
+ reference, score, and error fields returned by the API. Additive response fields are
251
+ preserved; legacy Evaluation Method/Evaluation Run responses missing required v2
252
+ fields are rejected.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "nufi-python"
3
- version = "1.1.2"
3
+ version = "1.1.3"
4
4
  authors = [
5
5
  { name = "Dudaji Inc." },
6
6
  ]
@@ -42,12 +42,12 @@ class TokenStore:
42
42
  def path_for(self, profile_name: str) -> Path:
43
43
  if not is_valid_profile_name(profile_name):
44
44
  raise AuthenticationError(
45
- "Invalid profile name. Use letters, numbers, dot, underscore, or dash."
45
+ "Invalid CLI Profile name. Use letters, numbers, dot, underscore, or dash."
46
46
  )
47
47
  path = (self.token_dir / f"{profile_name}.json").resolve()
48
48
  token_dir = self.token_dir.resolve()
49
49
  if not path.is_relative_to(token_dir):
50
- raise AuthenticationError("Invalid profile name.")
50
+ raise AuthenticationError("Invalid CLI Profile name.")
51
51
  return path
52
52
 
53
53
  def save(
@@ -79,13 +79,13 @@ class TokenStore:
79
79
  path = self.path_for(profile_name)
80
80
  if not path.exists():
81
81
  raise AuthenticationError(
82
- f"No token found for profile '{profile_name}'. Run 'nufi login'."
82
+ f"No token found for CLI Profile '{profile_name}'. Run 'nufi login'."
83
83
  )
84
84
  try:
85
85
  return json.loads(path.read_text())
86
86
  except json.JSONDecodeError as exc:
87
87
  raise AuthenticationError(
88
- f"Token file for profile '{profile_name}' is invalid."
88
+ f"Token file for CLI Profile '{profile_name}' is invalid."
89
89
  ) from exc
90
90
 
91
91
  def delete(self, profile_name: str) -> None:
@@ -111,7 +111,7 @@ def _request_error_message(
111
111
  hint = ""
112
112
  if host:
113
113
  hint = (
114
- f" Check DNS or /etc/hosts for '{host}', or recreate the profile with "
114
+ f" Check DNS or /etc/hosts for '{host}', or recreate the CLI Profile with "
115
115
  "`nufi profile create <name> --keycloak-issuer <url>`."
116
116
  )
117
117
  return f"{context}: could not reach Keycloak issuer {issuer}.{hint} Original error: {exc}"
@@ -235,7 +235,7 @@ def refresh_access_token(
235
235
  token_store: TokenStore | None = None,
236
236
  now: int | Callable[[], int] | None = None,
237
237
  ) -> str:
238
- """Refresh a profile access token after the API rejects it."""
238
+ """Refresh a CLI Profile access token after the API rejects it."""
239
239
  token_store = token_store or TokenStore()
240
240
  tokens = token_store.load(profile_name)
241
241
  refresh_token = tokens.get("refresh_token")
@@ -17,7 +17,9 @@ def _resolve(profile_name: str | None) -> tuple[str, config.Profile]:
17
17
 
18
18
 
19
19
  def login(
20
- profile_name: str | None = typer.Option(None, "--profile", help="Profile name."),
20
+ profile_name: str | None = typer.Option(
21
+ None, "--profile", help="CLI Profile name."
22
+ ),
21
23
  open_browser: bool = typer.Option(
22
24
  True,
23
25
  "--browser/--no-browser",
@@ -49,7 +51,9 @@ def login(
49
51
 
50
52
 
51
53
  def logout(
52
- profile_name: str | None = typer.Option(None, "--profile", help="Profile name."),
54
+ profile_name: str | None = typer.Option(
55
+ None, "--profile", help="CLI Profile name."
56
+ ),
53
57
  ):
54
58
  try:
55
59
  resolved_name, _ = _resolve(profile_name)
@@ -61,7 +65,9 @@ def logout(
61
65
 
62
66
 
63
67
  def whoami(
64
- profile_name: str | None = typer.Option(None, "--profile", help="Profile name."),
68
+ profile_name: str | None = typer.Option(
69
+ None, "--profile", help="CLI Profile name."
70
+ ),
65
71
  ):
66
72
  try:
67
73
  resolved_name, _ = _resolve(profile_name)
@@ -88,10 +94,10 @@ def whoami(
88
94
  or str(UUID(token_id)) != token_id
89
95
  ):
90
96
  raise AuthenticationError(
91
- "NUFI_TOKEN is not a NuFi project access token."
97
+ "NUFI_TOKEN is not a NuFi Project Access Token."
92
98
  )
93
99
  project = projects[0]
94
- console.print("Authentication: project token")
100
+ console.print("Authentication: Project Access Token")
95
101
  console.print(f"Token ID: {token_id}")
96
102
  console.print(f"Project: {project.name} ({project.id})")
97
103
  return
@@ -100,7 +106,7 @@ def whoami(
100
106
  raise typer.Exit(code=1) from exc
101
107
  except ValueError as exc:
102
108
  console.print(
103
- "[bold red]Error:[/] NUFI_TOKEN is not a NuFi project access token."
109
+ "[bold red]Error:[/] NUFI_TOKEN is not a NuFi Project Access Token."
104
110
  )
105
111
  raise typer.Exit(code=1) from exc
106
112
  except Exception as exc:
@@ -108,6 +114,6 @@ def whoami(
108
114
 
109
115
  username = claims.get("preferred_username") or claims.get("sub") or "-"
110
116
  email = claims.get("email") or "-"
111
- console.print(f"Profile: {resolved_name}")
117
+ console.print(f"CLI Profile: {resolved_name}")
112
118
  console.print(f"Username: {username}")
113
119
  console.print(f"Email: {email}")
@@ -165,18 +165,25 @@ def resolve_named_resource(
165
165
  raise ValidationError(
166
166
  f"Multiple {resource}s named '{target}'; matching IDs: {ids}{suffix}."
167
167
  )
168
- raise NotFoundError(f"{resource.capitalize()} not found: {target}")
168
+ raise NotFoundError(f"{resource} not found: {target}")
169
169
 
170
170
 
171
- def confirm_delete(
172
- *, resource: str, target: str, profile_name: str | None, yes: bool
171
+ def confirm_action(
172
+ *,
173
+ resource: str,
174
+ target: str,
175
+ profile_name: str | None,
176
+ yes: bool,
177
+ action: str = "Delete",
173
178
  ) -> None:
174
179
  if yes:
175
180
  return
176
181
 
177
- profile_label = profile_name or "active profile"
182
+ profile_label = (
183
+ f"CLI Profile '{profile_name}'" if profile_name else "active CLI Profile"
184
+ )
178
185
  if typer.confirm(
179
- f"Delete {resource} '{target}' from {profile_label}?",
186
+ f"{action} {resource} '{target}' from {profile_label}?",
180
187
  default=False,
181
188
  ):
182
189
  return
@@ -5,7 +5,7 @@ import typer
5
5
  from nufi.cli.commands import common
6
6
 
7
7
  app = typer.Typer(
8
- help="Manage NuFi compile runs.",
8
+ help="Manage NuFi Compile Runs.",
9
9
  invoke_without_command=True,
10
10
  context_settings=common.CONTEXT_SETTINGS,
11
11
  )
@@ -76,7 +76,7 @@ def list_compiles(
76
76
  version: str | None = typer.Option(
77
77
  None,
78
78
  "--version",
79
- help="Model version.",
79
+ help="Model Version.",
80
80
  show_default=False,
81
81
  ),
82
82
  phase: list[str] | None = typer.Option(
@@ -97,10 +97,12 @@ def list_compiles(
97
97
  "--limit",
98
98
  min=1,
99
99
  max=100,
100
- help="Runs per page.",
100
+ help="Compile Runs per page.",
101
101
  show_default=False,
102
102
  ),
103
- profile_name: str | None = typer.Option(None, "--profile", help="Profile name."),
103
+ profile_name: str | None = typer.Option(
104
+ None, "--profile", help="CLI Profile name."
105
+ ),
104
106
  output: common.OutputChoice = typer.Option(
105
107
  common.OutputChoice.table,
106
108
  "--output",
@@ -178,7 +180,7 @@ def create_compile(
178
180
  help="Project ID.",
179
181
  show_default=False,
180
182
  ),
181
- version: str = typer.Option(..., "--version", "-v", help="Model version."),
183
+ version: str = typer.Option(..., "--version", "-v", help="Model Version."),
182
184
  tensor_parallel_size: int | None = typer.Option(
183
185
  None,
184
186
  "--tensor-parallel-size",
@@ -240,7 +242,9 @@ def create_compile(
240
242
  interval: float = typer.Option(
241
243
  5, "--interval", min=0.001, help="Polling interval in seconds."
242
244
  ),
243
- profile_name: str | None = typer.Option(None, "--profile", help="Profile name."),
245
+ profile_name: str | None = typer.Option(
246
+ None, "--profile", help="CLI Profile name."
247
+ ),
244
248
  output: common.OutputChoice = typer.Option(
245
249
  common.OutputChoice.table,
246
250
  "--output",
@@ -272,7 +276,7 @@ def create_compile(
272
276
  )
273
277
  if wait:
274
278
  typer.echo(
275
- f"Compile created: {run.cr_name} (ID: {run.id}); resume with "
279
+ f"Compile Run created: {run.cr_name} (ID: {run.id}); resume with "
276
280
  f"'nufi compile wait {run.cr_name}'",
277
281
  err=True,
278
282
  )
@@ -292,7 +296,7 @@ def create_compile(
292
296
  _print_run(run, output)
293
297
  else:
294
298
  common.console.print(
295
- f"[bold green]Compile created:[/] {run.cr_name} (ID: {run.id})"
299
+ f"[bold green]Compile Run created:[/] {run.cr_name} (ID: {run.id})"
296
300
  )
297
301
  if run.phase == "Failed" or run.registration_error:
298
302
  raise typer.Exit(code=1)
@@ -300,12 +304,12 @@ def create_compile(
300
304
 
301
305
  @app.command("get")
302
306
  def get_compile(
303
- name: str | None = typer.Argument(None, help="Compile CR name."),
307
+ name: str | None = typer.Argument(None, help="Compile Run name."),
304
308
  run_id: int | None = typer.Option(
305
309
  None,
306
310
  "--run-id",
307
311
  min=1,
308
- help="Compile run ID.",
312
+ help="Compile Run ID.",
309
313
  show_default=False,
310
314
  ),
311
315
  project: str | None = typer.Option(
@@ -321,7 +325,9 @@ def get_compile(
321
325
  help="Project ID.",
322
326
  show_default=False,
323
327
  ),
324
- profile_name: str | None = typer.Option(None, "--profile", help="Profile name."),
328
+ profile_name: str | None = typer.Option(
329
+ None, "--profile", help="CLI Profile name."
330
+ ),
325
331
  output: common.OutputChoice = typer.Option(
326
332
  common.OutputChoice.table,
327
333
  "--output",
@@ -355,7 +361,7 @@ def get_compile(
355
361
 
356
362
  @app.command("wait")
357
363
  def wait_compile(
358
- target: str = typer.Argument(..., help="Compile CR name or numeric run ID."),
364
+ target: str = typer.Argument(..., help="Compile Run name or numeric ID."),
359
365
  project: str | None = typer.Option(
360
366
  None,
361
367
  "--project",
@@ -375,7 +381,9 @@ def wait_compile(
375
381
  interval: float = typer.Option(
376
382
  5, "--interval", min=0.001, help="Polling interval in seconds."
377
383
  ),
378
- profile_name: str | None = typer.Option(None, "--profile", help="Profile name."),
384
+ profile_name: str | None = typer.Option(
385
+ None, "--profile", help="CLI Profile name."
386
+ ),
379
387
  output: common.OutputChoice = typer.Option(
380
388
  common.OutputChoice.table,
381
389
  "--output",
@@ -411,7 +419,7 @@ def wait_compile(
411
419
 
412
420
  @app.command("delete")
413
421
  def delete_compile(
414
- name: str = typer.Argument(..., help="Compile CR name."),
422
+ name: str = typer.Argument(..., help="Compile Run name."),
415
423
  project: str | None = typer.Option(
416
424
  None,
417
425
  "--project",
@@ -425,7 +433,9 @@ def delete_compile(
425
433
  help="Project ID.",
426
434
  show_default=False,
427
435
  ),
428
- profile_name: str | None = typer.Option(None, "--profile", help="Profile name."),
436
+ profile_name: str | None = typer.Option(
437
+ None, "--profile", help="CLI Profile name."
438
+ ),
429
439
  yes: bool = typer.Option(False, "--yes", help="Skip delete confirmation."),
430
440
  verbose: bool = typer.Option(False, "--verbose", help="Show detailed errors."),
431
441
  ):
@@ -438,8 +448,8 @@ def delete_compile(
438
448
  except Exception as exc:
439
449
  common.handle_cli_error(exc, verbose=verbose)
440
450
 
441
- common.confirm_delete(
442
- resource="compile",
451
+ common.confirm_action(
452
+ resource="Compile Run",
443
453
  target=f"{resolved_project}/{name}",
444
454
  profile_name=profile_name,
445
455
  yes=yes,
@@ -454,7 +464,7 @@ def delete_compile(
454
464
  if client is not None:
455
465
  client.close()
456
466
 
457
- common.console.print(f"[bold green]Compile deleted:[/] {name}")
467
+ common.console.print(f"[bold green]Compile Run deleted:[/] {name}")
458
468
 
459
469
 
460
470
  def _parse_env(entries: list[str] | None) -> list[dict[str, str]] | None:
@@ -12,7 +12,7 @@ from nufi.cli.commands import common
12
12
  from nufi.resources import CustomEvaluationTemplatesResource
13
13
 
14
14
  app = typer.Typer(
15
- help="Manage Evaluation Templates.",
15
+ help="Manage Custom Evaluation Templates.",
16
16
  invoke_without_command=True,
17
17
  context_settings=common.CONTEXT_SETTINGS,
18
18
  )
@@ -25,7 +25,7 @@ ProjectID = Annotated[
25
25
  int | None,
26
26
  typer.Option("--project-id", min=1, help="Project ID.", show_default=False),
27
27
  ]
28
- Profile = Annotated[str | None, typer.Option("--profile", help="Profile name.")]
28
+ Profile = Annotated[str | None, typer.Option("--profile", help="CLI Profile name.")]
29
29
  Output = Annotated[
30
30
  common.OutputChoice,
31
31
  typer.Option("--output", help="Output format."),
@@ -89,7 +89,7 @@ def register_template(
89
89
  if result.image_policy == "mutable":
90
90
  common.error_console.print(
91
91
  "[yellow]Warning:[/] this image reference is mutable; different content "
92
- "may run across Runs."
92
+ "may run across Evaluation Runs."
93
93
  )
94
94
  if output == common.OutputChoice.json:
95
95
  common.print_json(result)
@@ -141,7 +141,9 @@ def list_templates(
141
141
 
142
142
  @app.command("get")
143
143
  def get_template(
144
- template_id: Annotated[str, typer.Argument(help="Custom template UUID.")],
144
+ template_id: Annotated[
145
+ str, typer.Argument(help="Custom Evaluation Template UUID.")
146
+ ],
145
147
  project: Project = None,
146
148
  project_id: ProjectID = None,
147
149
  profile_name: Profile = None,
@@ -163,7 +165,9 @@ def get_template(
163
165
 
164
166
  @app.command("archive")
165
167
  def archive_template(
166
- template_id: Annotated[str, typer.Argument(help="Custom template UUID.")],
168
+ template_id: Annotated[
169
+ str, typer.Argument(help="Custom Evaluation Template UUID.")
170
+ ],
167
171
  project: Project = None,
168
172
  project_id: ProjectID = None,
169
173
  profile_name: Profile = None,
@@ -171,7 +175,9 @@ def archive_template(
171
175
  verbose: Verbose = False,
172
176
  ):
173
177
  try:
174
- if not yes and not typer.confirm(f"Archive custom template '{template_id}'?"):
178
+ if not yes and not typer.confirm(
179
+ f"Archive Custom Evaluation Template '{template_id}'?"
180
+ ):
175
181
  raise typer.Exit()
176
182
  with _resource(profile_name) as resource:
177
183
  resource.archive(
@@ -182,13 +188,15 @@ def archive_template(
182
188
  except Exception as exc:
183
189
  common.handle_cli_error(exc, verbose=verbose)
184
190
  common.console.print(
185
- f"[bold green]Custom template archived:[/] {escape(template_id)}"
191
+ f"[bold green]Custom Evaluation Template archived:[/] {escape(template_id)}"
186
192
  )
187
193
 
188
194
 
189
195
  @app.command("restore")
190
196
  def restore_template(
191
- template_id: Annotated[str, typer.Argument(help="Custom template UUID.")],
197
+ template_id: Annotated[
198
+ str, typer.Argument(help="Custom Evaluation Template UUID.")
199
+ ],
192
200
  project: Project = None,
193
201
  project_id: ProjectID = None,
194
202
  profile_name: Profile = None,
@@ -202,5 +210,5 @@ def restore_template(
202
210
  except Exception as exc:
203
211
  common.handle_cli_error(exc, verbose=verbose)
204
212
  common.console.print(
205
- f"[bold green]Custom template restored:[/] {escape(template_id)}"
213
+ f"[bold green]Custom Evaluation Template restored:[/] {escape(template_id)}"
206
214
  )