nemo-evaluator-launcher 0.1.41__py3-none-any.whl → 0.1.56__py3-none-any.whl

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 (25) hide show
  1. nemo_evaluator_launcher/api/functional.py +55 -5
  2. nemo_evaluator_launcher/cli/ls_task.py +280 -0
  3. nemo_evaluator_launcher/cli/ls_tasks.py +208 -55
  4. nemo_evaluator_launcher/cli/main.py +17 -2
  5. nemo_evaluator_launcher/cli/run.py +41 -1
  6. nemo_evaluator_launcher/common/container_metadata/__init__.py +61 -0
  7. nemo_evaluator_launcher/common/container_metadata/intermediate_repr.py +530 -0
  8. nemo_evaluator_launcher/common/container_metadata/loading.py +1126 -0
  9. nemo_evaluator_launcher/common/container_metadata/registries.py +824 -0
  10. nemo_evaluator_launcher/common/container_metadata/utils.py +63 -0
  11. nemo_evaluator_launcher/common/helpers.py +44 -28
  12. nemo_evaluator_launcher/common/mapping.py +341 -155
  13. nemo_evaluator_launcher/common/printing_utils.py +18 -12
  14. nemo_evaluator_launcher/executors/lepton/executor.py +26 -8
  15. nemo_evaluator_launcher/executors/local/executor.py +6 -2
  16. nemo_evaluator_launcher/executors/slurm/executor.py +141 -9
  17. nemo_evaluator_launcher/package_info.py +1 -1
  18. nemo_evaluator_launcher/resources/all_tasks_irs.yaml +17016 -0
  19. nemo_evaluator_launcher/resources/mapping.toml +62 -354
  20. {nemo_evaluator_launcher-0.1.41.dist-info → nemo_evaluator_launcher-0.1.56.dist-info}/METADATA +2 -1
  21. {nemo_evaluator_launcher-0.1.41.dist-info → nemo_evaluator_launcher-0.1.56.dist-info}/RECORD +25 -18
  22. {nemo_evaluator_launcher-0.1.41.dist-info → nemo_evaluator_launcher-0.1.56.dist-info}/WHEEL +0 -0
  23. {nemo_evaluator_launcher-0.1.41.dist-info → nemo_evaluator_launcher-0.1.56.dist-info}/entry_points.txt +0 -0
  24. {nemo_evaluator_launcher-0.1.41.dist-info → nemo_evaluator_launcher-0.1.56.dist-info}/licenses/LICENSE +0 -0
  25. {nemo_evaluator_launcher-0.1.41.dist-info → nemo_evaluator_launcher-0.1.56.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,63 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
2
+ # SPDX-License-Identifier: Apache-2.0
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+ """Utility functions for container metadata processing."""
17
+
18
+
19
+ def parse_container_image(container_image: str) -> tuple[str, str, str, str]:
20
+ """Parse a container image string into registry type, registry URL, repository, and tag.
21
+
22
+ Args:
23
+ container_image: Container image string (e.g., "nvcr.io/nvidia/eval-factory/simple-evals:25.10")
24
+
25
+ Returns:
26
+ Tuple of (registry_type, registry_url, repository, tag)
27
+ """
28
+ # Split tag from image
29
+ if ":" in container_image:
30
+ image_part, tag = container_image.rsplit(":", 1)
31
+ else:
32
+ image_part = container_image
33
+ tag = "latest"
34
+
35
+ # Parse registry and repository
36
+ parts = image_part.split("/")
37
+ if len(parts) < 2:
38
+ raise ValueError(f"Invalid container image format: {container_image}")
39
+
40
+ # Check if first part is a registry (contains '.' or is 'localhost')
41
+ if "." in parts[0] or parts[0] == "localhost":
42
+ registry_host = parts[0]
43
+ # Determine registry type
44
+ if "gitlab" in registry_host.lower():
45
+ registry_type = "gitlab"
46
+ elif "nvcr.io" in registry_host:
47
+ registry_type = "nvcr"
48
+ else:
49
+ registry_type = "nvcr" # Default to nvcr for other registries
50
+
51
+ # Check if registry has a port
52
+ if ":" in registry_host:
53
+ registry_url = registry_host
54
+ else:
55
+ registry_url = registry_host
56
+ repository = "/".join(parts[1:])
57
+ else:
58
+ # Default registry (Docker Hub)
59
+ registry_type = "nvcr"
60
+ registry_url = "registry-1.docker.io"
61
+ repository = image_part
62
+
63
+ return registry_type, registry_url, repository, tag
@@ -14,7 +14,6 @@
14
14
  # limitations under the License.
15
15
  #
16
16
  import base64
17
- import copy
18
17
  import datetime
19
18
  from dataclasses import dataclass
20
19
  from typing import Optional
@@ -71,6 +70,47 @@ def _set_nested_optionally_overriding(
71
70
  temp[keys[-1]] = val
72
71
 
73
72
 
73
+ _MIGRATION_MESSAGE = """
74
+ `overrides` field is no longer supported. Use `nemo_evaluator_config` field instead, e.g.:
75
+
76
+ 1. If you are using overrides in your yaml config, replace:
77
+
78
+ ```yaml
79
+ evaluation:
80
+ overrides:
81
+ config.params.temperature: 0.6
82
+ config.params.top_p: 0.95
83
+ ```
84
+
85
+ with:
86
+
87
+ ```yaml
88
+ evaluation:
89
+ nemo_evaluator_config:
90
+ config:
91
+ params:
92
+ temperature: 0.6
93
+ top_p: 0.95
94
+ ```
95
+
96
+ 2. If you are using overrides in your cli command, replace:
97
+
98
+ ```bash
99
+ nemo-evaluator-launcher run --config my_config.yaml \\
100
+ -o evaluation.overrides.config.params.temperature=0.6 \\
101
+ -o evaluation.overrides.config.params.top_p=0.95
102
+ ```
103
+
104
+ with:
105
+
106
+ ```bash
107
+ nemo-evaluator-launcher run --config my_config.yaml \\
108
+ -o evaluation.nemo_evaluator_config.config.params.temperature=0.6 \\
109
+ -o evaluation.nemo_evaluator_config.config.params.top_p=0.95
110
+ ```
111
+ """
112
+
113
+
74
114
  def get_eval_factory_config(
75
115
  cfg: DictConfig,
76
116
  user_task_config: DictConfig,
@@ -79,17 +119,11 @@ def get_eval_factory_config(
79
119
 
80
120
  This function extracts the config field similar to how overrides are handled.
81
121
 
82
- Overrides will start to be deprecated (or not, but at least a warning will be logged).
122
+ It applies task-level overrides to the global overrides.
83
123
  """
84
124
 
85
125
  if cfg.evaluation.get("overrides") or user_task_config.get("overrides"):
86
- # TODO(agronskiy): start removing overrides, test `test_start_deprecating_overrides`
87
- # will start failing soon.
88
- logger.warning(
89
- "We are deprecating using old-style dot-delimited overrides "
90
- "in favour of `nemo_evaluator_config` field. Please check "
91
- "the documentation."
92
- )
126
+ raise ValueError(_MIGRATION_MESSAGE)
93
127
 
94
128
  logger.debug("Getting nemo evaluator merged config")
95
129
  # Extract config fields similar to overrides - convert to basic Python types first
@@ -163,6 +197,7 @@ def get_eval_factory_command(
163
197
  ["config", "output_dir"],
164
198
  "/results",
165
199
  )
200
+ # FIXME(martas): update to api_key_name after 25.12 is released
166
201
  _set_nested_optionally_overriding(
167
202
  merged_nemo_evaluator_config,
168
203
  ["target", "api_endpoint", "api_key"],
@@ -216,18 +251,6 @@ def get_eval_factory_command(
216
251
  + "&& $cmd run_eval --run_config config_ef.yaml"
217
252
  )
218
253
 
219
- # NOTE: see note and test about deprecating that.
220
- overrides = copy.deepcopy(dict(cfg.evaluation.get("overrides", {})))
221
- overrides.update(dict(user_task_config.get("overrides", {})))
222
- # NOTE(dfridman): Temporary fix to make sure that the overrides arg is not split into multiple lines.
223
- # Consider passing a JSON object on Eval Factory side
224
- overrides = {
225
- k: (v.strip("\n") if isinstance(v, str) else v) for k, v in overrides.items()
226
- }
227
- overrides_str = ",".join([f"{k}={v}" for k, v in overrides.items()])
228
- if overrides_str:
229
- eval_command = f"{eval_command} --overrides {overrides_str}"
230
-
231
254
  # We return both the command and the debugging base64-decoded strings, useful
232
255
  # for exposing when building scripts.
233
256
  return CmdAndReadableComment(
@@ -257,13 +280,6 @@ def get_endpoint_url(
257
280
  if nemo_evaluator_config_url:
258
281
  return nemo_evaluator_config_url
259
282
 
260
- # Being deprecated, see `get_eval_factory_config` message.
261
- overrides_old_style_url = merged_nemo_evaluator_config.get("overrides", {}).get(
262
- "target.api_endpoint.url", None
263
- )
264
- if overrides_old_style_url:
265
- return overrides_old_style_url
266
-
267
283
  return url
268
284
 
269
285
  if cfg.deployment.type == "none":