nemo-evaluator 0.1.71__py3-none-any.whl → 0.1.73__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.
- nemo_evaluator/core/entrypoint.py +7 -4
- nemo_evaluator/core/input.py +12 -4
- nemo_evaluator/package_info.py +1 -1
- {nemo_evaluator-0.1.71.dist-info → nemo_evaluator-0.1.73.dist-info}/METADATA +1 -1
- {nemo_evaluator-0.1.71.dist-info → nemo_evaluator-0.1.73.dist-info}/RECORD +9 -9
- {nemo_evaluator-0.1.71.dist-info → nemo_evaluator-0.1.73.dist-info}/WHEEL +0 -0
- {nemo_evaluator-0.1.71.dist-info → nemo_evaluator-0.1.73.dist-info}/entry_points.txt +0 -0
- {nemo_evaluator-0.1.71.dist-info → nemo_evaluator-0.1.73.dist-info}/licenses/LICENSE +0 -0
- {nemo_evaluator-0.1.71.dist-info → nemo_evaluator-0.1.73.dist-info}/top_level.txt +0 -0
|
@@ -30,6 +30,7 @@ from nemo_evaluator.api.api_dataclasses import (
|
|
|
30
30
|
from nemo_evaluator.core.evaluate import evaluate
|
|
31
31
|
from nemo_evaluator.core.input import (
|
|
32
32
|
_get_framework_evaluations,
|
|
33
|
+
_is_internal_package_installed,
|
|
33
34
|
_parse_cli_args,
|
|
34
35
|
load_run_config,
|
|
35
36
|
validate_configuration,
|
|
@@ -136,11 +137,16 @@ def show_available_tasks() -> None:
|
|
|
136
137
|
if not core_evals_pkg:
|
|
137
138
|
print("NO evaluation packages are installed.")
|
|
138
139
|
|
|
140
|
+
include_internal = _is_internal_package_installed()
|
|
139
141
|
for pkg in core_evals_pkg:
|
|
140
142
|
framework_eval_mapping, *_ = _get_framework_evaluations(
|
|
141
|
-
os.path.join(pkg.module_finder.path, pkg.name, "framework.yml")
|
|
143
|
+
os.path.join(pkg.module_finder.path, pkg.name, "framework.yml"),
|
|
144
|
+
include_internal=include_internal,
|
|
142
145
|
)
|
|
143
146
|
for ind_pkg in framework_eval_mapping.keys():
|
|
147
|
+
# Empty task mapping means harness has no public tasks.
|
|
148
|
+
if not framework_eval_mapping[ind_pkg]:
|
|
149
|
+
continue
|
|
144
150
|
print(f"{ind_pkg}: ")
|
|
145
151
|
for task in framework_eval_mapping[ind_pkg].keys():
|
|
146
152
|
print(f" * {task}")
|
|
@@ -160,9 +166,6 @@ def run(args) -> None:
|
|
|
160
166
|
print(cmd)
|
|
161
167
|
exit(0)
|
|
162
168
|
|
|
163
|
-
# Validate configuration first (catches config errors early, before evaluate())
|
|
164
|
-
validate_configuration(run_config)
|
|
165
|
-
|
|
166
169
|
metadata_cfg: EvaluationMetadata | None = run_config.get("metadata")
|
|
167
170
|
|
|
168
171
|
# Build evaluation configuration with framework defaults merged
|
nemo_evaluator/core/input.py
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
# limitations under the License.
|
|
15
15
|
|
|
16
16
|
import copy
|
|
17
|
+
import importlib.util
|
|
17
18
|
import os
|
|
18
19
|
import pkgutil
|
|
19
20
|
from typing import Optional
|
|
@@ -112,7 +113,13 @@ def parse_override_params(override_params_str: Optional[str] = None) -> dict:
|
|
|
112
113
|
return dotlist_to_dict(pairs)
|
|
113
114
|
|
|
114
115
|
|
|
115
|
-
def
|
|
116
|
+
def _is_internal_package_installed() -> bool:
|
|
117
|
+
return importlib.util.find_spec("nemo_evaluator_internal") is not None
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
def get_framework_evaluations(
|
|
121
|
+
filepath: str, *, include_internal: bool = True
|
|
122
|
+
) -> tuple[str, dict, dict[str, Evaluation]]:
|
|
116
123
|
framework = {}
|
|
117
124
|
with open(filepath, "r") as f:
|
|
118
125
|
framework = yaml.safe_load(f)
|
|
@@ -124,6 +131,8 @@ def get_framework_evaluations(filepath: str) -> tuple[str, dict, dict[str, Evalu
|
|
|
124
131
|
run_config_framework_defaults["pkg_name"] = pkg_name
|
|
125
132
|
evaluations = dict()
|
|
126
133
|
for evaluation_dict in framework["evaluations"]:
|
|
134
|
+
if evaluation_dict.get("internal", False) and not include_internal:
|
|
135
|
+
continue
|
|
127
136
|
# Apply run config evaluation defaults onto the framework defaults
|
|
128
137
|
run_config_task_defaults = deep_update(
|
|
129
138
|
run_config_framework_defaults, evaluation_dict["defaults"], skip_nones=True
|
|
@@ -139,7 +148,7 @@ def get_framework_evaluations(filepath: str) -> tuple[str, dict, dict[str, Evalu
|
|
|
139
148
|
|
|
140
149
|
# improve typing
|
|
141
150
|
def _get_framework_evaluations(
|
|
142
|
-
def_file: str,
|
|
151
|
+
def_file: str, *, include_internal: bool = True
|
|
143
152
|
) -> tuple[dict[str, dict[str, Evaluation]], dict[str, dict], dict[str, Evaluation]]:
|
|
144
153
|
# we should decide if this should raise at this point.
|
|
145
154
|
# Probably not because this function is used with task invocation that might
|
|
@@ -155,7 +164,7 @@ def _get_framework_evaluations(
|
|
|
155
164
|
framework_name,
|
|
156
165
|
framework_defaults,
|
|
157
166
|
framework_evaluations,
|
|
158
|
-
) = get_framework_evaluations(def_file)
|
|
167
|
+
) = get_framework_evaluations(def_file, include_internal=include_internal)
|
|
159
168
|
framework_eval_mapping[framework_name] = framework_evaluations
|
|
160
169
|
eval_name_mapping.update(framework_evaluations)
|
|
161
170
|
framework_defaults = {framework_name: framework_defaults}
|
|
@@ -368,7 +377,6 @@ def get_evaluation(
|
|
|
368
377
|
]
|
|
369
378
|
except KeyError:
|
|
370
379
|
default_evaluation = Evaluation(**raw_framework_defaults)
|
|
371
|
-
evaluation_config.type = evaluation_name
|
|
372
380
|
default_evaluation.config.params.task = evaluation_name
|
|
373
381
|
else:
|
|
374
382
|
if isinstance(all_eval_name_mapping[evaluation_name], list):
|
nemo_evaluator/package_info.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
nemo_evaluator/__init__.py,sha256=lwW_lnmHxRBVEWkT1g71icmaxDR1_DqMrh4wSR0vk58,1787
|
|
2
|
-
nemo_evaluator/package_info.py,sha256=
|
|
2
|
+
nemo_evaluator/package_info.py,sha256=EO8IUhWhQtBdjTqY4qU8dFKH5L_PH08uwNK2Ke8Nyq8,1525
|
|
3
3
|
nemo_evaluator/adapters/__init__.py,sha256=Qbiv8oknyr5yqpWp1npFw3p6EDwZnKUwL3VZXQGtjos,685
|
|
4
4
|
nemo_evaluator/adapters/adapter_config.py,sha256=kyL2KVi7Zc6sn8BomujTY54SK-0RoCZk5v4gS7KHbYk,28007
|
|
5
5
|
nemo_evaluator/adapters/decorators.py,sha256=DeeDW4YscGHNbjq-GyW60WXSfu6TKLaWLCyrmWkqpvw,5648
|
|
@@ -31,9 +31,9 @@ nemo_evaluator/client/__init__.py,sha256=IAgXYWT3RwimEjBy80mFC-nLDCUa5KzWVhVX9As
|
|
|
31
31
|
nemo_evaluator/client/adapter_transport.py,sha256=CybHNbmRxLo2fwDMqbOp8ndYFSKQ_W4ckThmOmmr0Vg,11664
|
|
32
32
|
nemo_evaluator/client/client.py,sha256=DkJjHGzkHWENrLC6Sx8h8HwQRjTAtW_7gpjv4_ZNiO4,12940
|
|
33
33
|
nemo_evaluator/core/__init__.py,sha256=z7nZ70W5kCiFqkpxrOAt2IQfP61II94KIZYf3HwS4w4,120
|
|
34
|
-
nemo_evaluator/core/entrypoint.py,sha256=
|
|
34
|
+
nemo_evaluator/core/entrypoint.py,sha256=4kZCuBOgZBuK9A19k9tTIgGoVZG8fRHp7NCtxVpxjCk,7659
|
|
35
35
|
nemo_evaluator/core/evaluate.py,sha256=49bZ0xIIGl2e9ClE6tLZtVqmQ2yEORiGOLLMpdQtMK8,13124
|
|
36
|
-
nemo_evaluator/core/input.py,sha256=
|
|
36
|
+
nemo_evaluator/core/input.py,sha256=1ciyjDShq8OdfzxF5GoKve2LPUWkcFzpDixNNsRBqN8,20243
|
|
37
37
|
nemo_evaluator/core/resources.py,sha256=N8ZBpSUuGFIVSQj7pD0jKeFtxqWPWEhxjpQMVfd1RlY,10441
|
|
38
38
|
nemo_evaluator/core/utils.py,sha256=qnxIsu3-xqgqmAMpqrqpeebu70qqmwCwscRYvZRk2AI,12707
|
|
39
39
|
nemo_evaluator/logging/__init__.py,sha256=s4uGLnSZiSsHJiT42xfwYJAnEfZWVGmgYaEMEkJxVrc,1285
|
|
@@ -46,9 +46,9 @@ nemo_evaluator/resources/output_tpl.py,sha256=7gIjcHy2BUTGu5hdf2zLkJgcHck8b4mPvi
|
|
|
46
46
|
nemo_evaluator/sandbox/__init__.py,sha256=J6fFnQwSgOOsSsudWcRgY8LjFKoiwYRh6UFAiwKmxM0,1066
|
|
47
47
|
nemo_evaluator/sandbox/base.py,sha256=AwAlWcKdSJKLn3DrvENgCUrxcWFu7ItO1NqJBS1z0cY,3199
|
|
48
48
|
nemo_evaluator/sandbox/ecs_fargate.py,sha256=DI6QToYngqrzl8vf1I4GRj0AwDn1YQO64g36-6naZm8,49785
|
|
49
|
-
nemo_evaluator-0.1.
|
|
50
|
-
nemo_evaluator-0.1.
|
|
51
|
-
nemo_evaluator-0.1.
|
|
52
|
-
nemo_evaluator-0.1.
|
|
53
|
-
nemo_evaluator-0.1.
|
|
54
|
-
nemo_evaluator-0.1.
|
|
49
|
+
nemo_evaluator-0.1.73.dist-info/licenses/LICENSE,sha256=COyFnIvgPj0PZK5t89Z_f9mQBR4LH2rDJAkVvR3m7gM,11348
|
|
50
|
+
nemo_evaluator-0.1.73.dist-info/METADATA,sha256=_-0b5IGLkhOuIUB04GfznSIezTNQIAA76rvptTifxqg,14203
|
|
51
|
+
nemo_evaluator-0.1.73.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
52
|
+
nemo_evaluator-0.1.73.dist-info/entry_points.txt,sha256=lDcQ6UDEwgoyYdkDx3_YJw8Bzipl_xfVOp3U24IqgcU,289
|
|
53
|
+
nemo_evaluator-0.1.73.dist-info/top_level.txt,sha256=Y-IJy0kY4bd0bay8J_cGaZmxNSjZN3MiFhW7B3VyTeU,15
|
|
54
|
+
nemo_evaluator-0.1.73.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|