nvidia-nat 1.4.0a20251102__py3-none-any.whl → 1.4.0a20251112__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.
- nat/cli/commands/workflow/workflow_commands.py +3 -2
- nat/eval/dataset_handler/dataset_filter.py +34 -2
- nat/eval/evaluate.py +1 -1
- nat/eval/utils/weave_eval.py +17 -3
- nat/front_ends/fastapi/fastapi_front_end_config.py +7 -0
- nat/front_ends/fastapi/fastapi_front_end_plugin.py +13 -7
- nat/front_ends/fastapi/fastapi_front_end_plugin_worker.py +20 -14
- nat/llm/aws_bedrock_llm.py +11 -9
- nat/llm/azure_openai_llm.py +12 -4
- nat/llm/litellm_llm.py +11 -4
- nat/llm/nim_llm.py +11 -9
- nat/llm/openai_llm.py +12 -9
- nat/tool/code_execution/code_sandbox.py +3 -6
- nat/tool/code_execution/local_sandbox/Dockerfile.sandbox +19 -32
- nat/tool/code_execution/local_sandbox/local_sandbox_server.py +5 -0
- nat/tool/code_execution/local_sandbox/sandbox.requirements.txt +2 -0
- nat/tool/code_execution/local_sandbox/start_local_sandbox.sh +10 -4
- nat/tool/server_tools.py +15 -2
- nat/utils/__init__.py +8 -4
- nat/utils/io/yaml_tools.py +73 -3
- {nvidia_nat-1.4.0a20251102.dist-info → nvidia_nat-1.4.0a20251112.dist-info}/METADATA +3 -1
- {nvidia_nat-1.4.0a20251102.dist-info → nvidia_nat-1.4.0a20251112.dist-info}/RECORD +27 -30
- nat/data_models/temperature_mixin.py +0 -44
- nat/data_models/top_p_mixin.py +0 -44
- nat/tool/code_execution/test_code_execution_sandbox.py +0 -414
- {nvidia_nat-1.4.0a20251102.dist-info → nvidia_nat-1.4.0a20251112.dist-info}/WHEEL +0 -0
- {nvidia_nat-1.4.0a20251102.dist-info → nvidia_nat-1.4.0a20251112.dist-info}/entry_points.txt +0 -0
- {nvidia_nat-1.4.0a20251102.dist-info → nvidia_nat-1.4.0a20251112.dist-info}/licenses/LICENSE-3rd-party.txt +0 -0
- {nvidia_nat-1.4.0a20251102.dist-info → nvidia_nat-1.4.0a20251112.dist-info}/licenses/LICENSE.md +0 -0
- {nvidia_nat-1.4.0a20251102.dist-info → nvidia_nat-1.4.0a20251112.dist-info}/top_level.txt +0 -0
nat/utils/__init__.py
CHANGED
|
@@ -29,7 +29,8 @@ async def run_workflow(*,
|
|
|
29
29
|
config: "Config | None" = None,
|
|
30
30
|
config_file: "StrPath | None" = None,
|
|
31
31
|
prompt: str,
|
|
32
|
-
to_type: type[_T] = str
|
|
32
|
+
to_type: type[_T] = str,
|
|
33
|
+
session_kwargs: dict[str, typing.Any] | None = None) -> _T:
|
|
33
34
|
"""
|
|
34
35
|
Wrapper to run a workflow given either a config or a config file path and a prompt, returning the result in the
|
|
35
36
|
type specified by the `to_type`.
|
|
@@ -66,7 +67,10 @@ async def run_workflow(*,
|
|
|
66
67
|
|
|
67
68
|
config = load_config(config_file)
|
|
68
69
|
|
|
70
|
+
session_kwargs = session_kwargs or {}
|
|
71
|
+
|
|
69
72
|
async with WorkflowBuilder.from_config(config=config) as workflow_builder:
|
|
70
|
-
|
|
71
|
-
async with
|
|
72
|
-
|
|
73
|
+
session_manager = SessionManager(await workflow_builder.build())
|
|
74
|
+
async with session_manager.session(**session_kwargs) as session:
|
|
75
|
+
async with session.run(prompt) as runner:
|
|
76
|
+
return await runner.result(to_type=to_type)
|
nat/utils/io/yaml_tools.py
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
import io
|
|
17
17
|
import logging
|
|
18
18
|
import typing
|
|
19
|
+
from pathlib import Path
|
|
19
20
|
|
|
20
21
|
import expandvars
|
|
21
22
|
import yaml
|
|
@@ -44,23 +45,92 @@ def _interpolate_variables(value: str | int | float | bool | None) -> str | int
|
|
|
44
45
|
return expandvars.expandvars(value)
|
|
45
46
|
|
|
46
47
|
|
|
47
|
-
def
|
|
48
|
+
def deep_merge(base: dict, override: dict) -> dict:
|
|
49
|
+
"""
|
|
50
|
+
Recursively merge override dictionary into base dictionary.
|
|
51
|
+
|
|
52
|
+
Args:
|
|
53
|
+
base (dict): The base configuration dictionary.
|
|
54
|
+
override (dict): The override configuration dictionary.
|
|
55
|
+
|
|
56
|
+
Returns:
|
|
57
|
+
dict: The merged configuration dictionary.
|
|
58
|
+
"""
|
|
59
|
+
result = base.copy()
|
|
60
|
+
for key, value in override.items():
|
|
61
|
+
if key in result and isinstance(result[key], dict) and isinstance(value, dict):
|
|
62
|
+
result[key] = deep_merge(result[key], value)
|
|
63
|
+
else:
|
|
64
|
+
result[key] = value
|
|
65
|
+
return result
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def yaml_load(config_path: StrPath, _visited: set[Path] | None = None) -> dict:
|
|
48
69
|
"""
|
|
49
70
|
Load a YAML file and interpolate variables in the format
|
|
50
71
|
${VAR:-default_value}.
|
|
51
72
|
|
|
73
|
+
If the YAML file contains a "base" key, the file at that path will be
|
|
74
|
+
loaded first, and the current config will be merged on top of it. This enables
|
|
75
|
+
config inheritance to reduce duplication across similar configuration files.
|
|
76
|
+
|
|
52
77
|
Args:
|
|
53
78
|
config_path (StrPath): The path to the YAML file to load.
|
|
79
|
+
_visited (set[Path] | None): Internal parameter for circular dependency detection.
|
|
54
80
|
|
|
55
81
|
Returns:
|
|
56
82
|
dict: The processed configuration dictionary.
|
|
83
|
+
|
|
84
|
+
Raises:
|
|
85
|
+
TypeError: If the "base" key is not a string.
|
|
86
|
+
FileNotFoundError: If the base configuration file does not exist.
|
|
87
|
+
ValueError: If a circular dependency is detected in configuration inheritance.
|
|
57
88
|
"""
|
|
89
|
+
# Normalize the config path and detect circular dependencies
|
|
90
|
+
config_path_obj = Path(config_path).resolve()
|
|
91
|
+
|
|
92
|
+
if _visited is None:
|
|
93
|
+
_visited = set()
|
|
94
|
+
|
|
95
|
+
if config_path_obj in _visited:
|
|
96
|
+
raise ValueError(f"Circular dependency detected in configuration inheritance: {config_path_obj} "
|
|
97
|
+
f"is already in the inheritance chain")
|
|
98
|
+
|
|
99
|
+
_visited.add(config_path_obj)
|
|
58
100
|
|
|
59
101
|
# Read YAML file
|
|
60
|
-
with open(
|
|
102
|
+
with open(config_path_obj, encoding="utf-8") as stream:
|
|
61
103
|
config_str = stream.read()
|
|
62
104
|
|
|
63
|
-
|
|
105
|
+
config = yaml_loads(config_str)
|
|
106
|
+
|
|
107
|
+
# Check if config specifies a base for inheritance
|
|
108
|
+
if "base" in config:
|
|
109
|
+
base_path_str = config["base"]
|
|
110
|
+
|
|
111
|
+
# Validate that base is a string
|
|
112
|
+
if not isinstance(base_path_str, str):
|
|
113
|
+
raise TypeError(f"Configuration 'base' key must be a string, got {type(base_path_str).__name__}")
|
|
114
|
+
|
|
115
|
+
# Resolve base path relative to current config
|
|
116
|
+
if not Path(base_path_str).is_absolute():
|
|
117
|
+
base_path = config_path_obj.parent / base_path_str
|
|
118
|
+
else:
|
|
119
|
+
base_path = Path(base_path_str)
|
|
120
|
+
|
|
121
|
+
# Normalize and check if base file exists
|
|
122
|
+
base_path = base_path.resolve()
|
|
123
|
+
if not base_path.exists():
|
|
124
|
+
raise FileNotFoundError(f"Base configuration file not found: {base_path}")
|
|
125
|
+
|
|
126
|
+
# Load base config (recursively, so bases can have bases)
|
|
127
|
+
base_config = yaml_load(base_path, _visited=_visited)
|
|
128
|
+
|
|
129
|
+
# Perform deep merge and remove 'base' key from result
|
|
130
|
+
config = deep_merge(base_config, config)
|
|
131
|
+
config.pop("base", None)
|
|
132
|
+
|
|
133
|
+
return config
|
|
64
134
|
|
|
65
135
|
|
|
66
136
|
def yaml_loads(config: str) -> dict:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nvidia-nat
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.0a20251112
|
|
4
4
|
Summary: NVIDIA NeMo Agent toolkit
|
|
5
5
|
Author: NVIDIA Corporation
|
|
6
6
|
Maintainer: NVIDIA Corporation
|
|
@@ -89,6 +89,8 @@ Requires-Dist: nvidia-nat-opentelemetry; extra == "telemetry"
|
|
|
89
89
|
Requires-Dist: nvidia-nat-phoenix; extra == "telemetry"
|
|
90
90
|
Requires-Dist: nvidia-nat-ragaai; extra == "telemetry"
|
|
91
91
|
Requires-Dist: nvidia-nat-weave; extra == "telemetry"
|
|
92
|
+
Provides-Extra: test
|
|
93
|
+
Requires-Dist: nvidia-nat-test; extra == "test"
|
|
92
94
|
Provides-Extra: weave
|
|
93
95
|
Requires-Dist: nvidia-nat-weave; extra == "weave"
|
|
94
96
|
Provides-Extra: zep-cloud
|
|
@@ -99,7 +99,7 @@ nat/cli/commands/sizing/calc.py,sha256=3cJHKCbzvV7EwYfLcpfk3_Ki7soAjOaiBcLK-Q6hP
|
|
|
99
99
|
nat/cli/commands/sizing/sizing.py,sha256=-Hr9mz_ScEMtBbn6ijvmmWVk0WybLeX0Ryi4qhDiYQU,902
|
|
100
100
|
nat/cli/commands/workflow/__init__.py,sha256=GUJrgGtpvyMUCjUBvR3faAdv-tZzbU9W-izgx9aMEQg,680
|
|
101
101
|
nat/cli/commands/workflow/workflow.py,sha256=40nIOehOX-4xI-qJqJraBX3XVz3l2VtFsZkMQYd897w,1342
|
|
102
|
-
nat/cli/commands/workflow/workflow_commands.py,sha256=
|
|
102
|
+
nat/cli/commands/workflow/workflow_commands.py,sha256=SI2redhG-9tLgWWXcRjkxdFhvKmmzBIqzWHZhRZpAbQ,14399
|
|
103
103
|
nat/cli/commands/workflow/templates/__init__.py.j2,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
104
104
|
nat/cli/commands/workflow/templates/config.yml.j2,sha256=KORGAFt1TW524YxXD2jpm_uTESihUKV5fnSoXQrH1PI,368
|
|
105
105
|
nat/cli/commands/workflow/templates/pyproject.toml.j2,sha256=lDBC4exHYutXa_skuJj176yMEuZr-DsdzrqQHPZoKpk,1035
|
|
@@ -148,9 +148,7 @@ nat/data_models/step_adaptor.py,sha256=1qn56wB_nIYBM5IjN4ftsltCAkqaJd3Sqe5v0TRR4
|
|
|
148
148
|
nat/data_models/streaming.py,sha256=sSqJqLqb70qyw69_4R9QC2RMbRw7UjTLPdo3FYBUGxE,1159
|
|
149
149
|
nat/data_models/swe_bench_model.py,sha256=uZs-hLFuT1B5CiPFwFg1PHinDW8PHne8TBzu7tHFv_k,1718
|
|
150
150
|
nat/data_models/telemetry_exporter.py,sha256=P7kqxIQnFVuvo_UFpH9QSB8fACy_0U2Uzkw_IfWXagE,998
|
|
151
|
-
nat/data_models/temperature_mixin.py,sha256=LlpfWrWtDrPJfSKfNx5E0P3p5SNGZli7ACRRpmO0QqA,1628
|
|
152
151
|
nat/data_models/thinking_mixin.py,sha256=VRDUJZ8XP_Vv0gW2FRZUf8O9-kVgNEdZCEZ8oEmHyMk,3335
|
|
153
|
-
nat/data_models/top_p_mixin.py,sha256=mu0DLnCAiwNzpSFR8FOW4kQBUpodSrvUR4MsLrNtbgA,1599
|
|
154
152
|
nat/data_models/ttc_strategy.py,sha256=tAkKWcyEBmBOOYtHMtQTgeCbHxFTk5SEkmFunNVnfyE,1114
|
|
155
153
|
nat/embedder/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
156
154
|
nat/embedder/azure_openai_embedder.py,sha256=yMHOA6lWZl15Pvd9Gpp_rHy5q2qmBiRjbFesFBGuC_U,2441
|
|
@@ -159,7 +157,7 @@ nat/embedder/openai_embedder.py,sha256=To7aCg8UyWPwSoA0MAHanH_MAKFDi3EcZxgLU1xYE
|
|
|
159
157
|
nat/embedder/register.py,sha256=TM_LKuSlJr3tEceNVuHfAx_yrCzf1sryD5Ycep5rNGo,883
|
|
160
158
|
nat/eval/__init__.py,sha256=Xs1JQ16L9btwreh4pdGKwskffAw1YFO48jKrU4ib_7c,685
|
|
161
159
|
nat/eval/config.py,sha256=G0LE4JpZaQy3PvERldVATFpQCiDQcVJGUFChgorqzNo,2377
|
|
162
|
-
nat/eval/evaluate.py,sha256=
|
|
160
|
+
nat/eval/evaluate.py,sha256=CrJk7HMNH4gzmvrnIvQxIPWeX1w9A3Zv5meat7J6dAg,26942
|
|
163
161
|
nat/eval/intermediate_step_adapter.py,sha256=mquQfPbq4-Owid2GzSyxtGNXoZ0i8crB6sA49rxnyrU,4483
|
|
164
162
|
nat/eval/register.py,sha256=Vce8HGsu6KDj7MA_5W2ziQtss1F180ndMjuqGiHxTe8,1358
|
|
165
163
|
nat/eval/remote_workflow.py,sha256=JAAbD0s753AOjo9baT4OqcB5dVEDmN34jPe0Uk13LcU,6024
|
|
@@ -167,7 +165,7 @@ nat/eval/runtime_event_subscriber.py,sha256=9MVgZLKvpnThHINaPbszPYDWnJ61sntS09YZ
|
|
|
167
165
|
nat/eval/usage_stats.py,sha256=r8Zr3bIy2qXU1BgVKXr_4mr7bG0hte3BPNQLSgZvg8M,1376
|
|
168
166
|
nat/eval/dataset_handler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
169
167
|
nat/eval/dataset_handler/dataset_downloader.py,sha256=ZaNohbRSvoHPWIj0C_FqyJnhQKoTBk_uZF7ijjfk6vE,4641
|
|
170
|
-
nat/eval/dataset_handler/dataset_filter.py,sha256=
|
|
168
|
+
nat/eval/dataset_handler/dataset_filter.py,sha256=8ul9j8XvMJG28k2NoiTzGhN6l8pq58Y1T22uuW_m1rk,3397
|
|
171
169
|
nat/eval/dataset_handler/dataset_handler.py,sha256=my28rKvQiiRN_h2TJz6fdKeMOjP3LC3_e2aJNnPPYhE,18159
|
|
172
170
|
nat/eval/evaluator/__init__.py,sha256=GUJrgGtpvyMUCjUBvR3faAdv-tZzbU9W-izgx9aMEQg,680
|
|
173
171
|
nat/eval/evaluator/base_evaluator.py,sha256=5WaVGhCGzkynCJyQdxRv7CtqLoUpr6B4O8tilP_gb3g,3232
|
|
@@ -194,7 +192,7 @@ nat/eval/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
194
192
|
nat/eval/utils/eval_trace_ctx.py,sha256=hN0YZ0wMOPzh9I-iSav-cGdxY3RWQWoE_tk5BxUf1mc,3264
|
|
195
193
|
nat/eval/utils/output_uploader.py,sha256=wtAaxvrJrjQPFt8mTLSz31sWDs09KmLkmyelMQOLDws,5667
|
|
196
194
|
nat/eval/utils/tqdm_position_registry.py,sha256=9CtpCk1wtYCSyieHPaSp8nlZu6EcNUOaUz2RTqfekrA,1286
|
|
197
|
-
nat/eval/utils/weave_eval.py,sha256=
|
|
195
|
+
nat/eval/utils/weave_eval.py,sha256=kmpeSzDtZiHJW_suc1U6MlvPe_9cFIudjhr-C79MVAc,8238
|
|
198
196
|
nat/experimental/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
199
197
|
nat/experimental/decorators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
200
198
|
nat/experimental/decorators/experimental_warning_decorator.py,sha256=ADj8fR9jL2FGFDcR8zJZbdvO9Leur8pUEVEUqpfNENY,5757
|
|
@@ -242,10 +240,10 @@ nat/front_ends/console/register.py,sha256=2Kf6Mthx6jzWzU8YdhYIR1iABmZDvs1UXM_20n
|
|
|
242
240
|
nat/front_ends/cron/__init__.py,sha256=Xs1JQ16L9btwreh4pdGKwskffAw1YFO48jKrU4ib_7c,685
|
|
243
241
|
nat/front_ends/fastapi/__init__.py,sha256=Xs1JQ16L9btwreh4pdGKwskffAw1YFO48jKrU4ib_7c,685
|
|
244
242
|
nat/front_ends/fastapi/dask_client_mixin.py,sha256=N_tw4yxA7EKIFTKp5_C2ZksIZucWxRYkFjmZszkAkXc,2072
|
|
245
|
-
nat/front_ends/fastapi/fastapi_front_end_config.py,sha256=
|
|
243
|
+
nat/front_ends/fastapi/fastapi_front_end_config.py,sha256=O_iRpGS3Vpht7ZNr1bYpvoldDEb9Z6f7tFPazVP5i9U,12383
|
|
246
244
|
nat/front_ends/fastapi/fastapi_front_end_controller.py,sha256=ei-34KCMpyaeAgeAN4gVvSGFjewjjRhHZPN0FqAfhDY,2548
|
|
247
|
-
nat/front_ends/fastapi/fastapi_front_end_plugin.py,sha256=
|
|
248
|
-
nat/front_ends/fastapi/fastapi_front_end_plugin_worker.py,sha256=
|
|
245
|
+
nat/front_ends/fastapi/fastapi_front_end_plugin.py,sha256=5akdWipe8onOTdSqrbGq9KO71y0_BNQQJ3JAFj6LmFY,11575
|
|
246
|
+
nat/front_ends/fastapi/fastapi_front_end_plugin_worker.py,sha256=QMERZEifVTDMWttSQqPZu3k8EEPJflPrIR6tkHTkZYg,60594
|
|
249
247
|
nat/front_ends/fastapi/intermediate_steps_subscriber.py,sha256=kbyWlBVpyvyQQjeUnFG9nsR4RaqqNkx567ZSVwwl2RU,3104
|
|
250
248
|
nat/front_ends/fastapi/job_store.py,sha256=cWIBnIgRdkGL7qbBunEKzTYzdPp3l3QCDHMP-qTZJpc,22743
|
|
251
249
|
nat/front_ends/fastapi/main.py,sha256=s8gXCy61rJjK1aywMRpgPvzlkMGsCS-kI_0EIy4JjBM,2445
|
|
@@ -271,11 +269,11 @@ nat/front_ends/mcp/tool_converter.py,sha256=IOHb8UoW_TVvRoiML2yi6nlbx13KgcmUsuYO
|
|
|
271
269
|
nat/front_ends/simple_base/__init__.py,sha256=Xs1JQ16L9btwreh4pdGKwskffAw1YFO48jKrU4ib_7c,685
|
|
272
270
|
nat/front_ends/simple_base/simple_front_end_plugin_base.py,sha256=py_yA9XAw-yHfK5cQJLM8ElnubEEM2ac8M0bvz-ScWs,1801
|
|
273
271
|
nat/llm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
274
|
-
nat/llm/aws_bedrock_llm.py,sha256=
|
|
275
|
-
nat/llm/azure_openai_llm.py,sha256=
|
|
276
|
-
nat/llm/litellm_llm.py,sha256
|
|
277
|
-
nat/llm/nim_llm.py,sha256=
|
|
278
|
-
nat/llm/openai_llm.py,sha256=
|
|
272
|
+
nat/llm/aws_bedrock_llm.py,sha256=ibaVTn72ae4Syugc21N2fNBjI2wv_UHXj4LbDrdRKBk,3508
|
|
273
|
+
nat/llm/azure_openai_llm.py,sha256=D_NCCiFvte43sxdOXZAI6A-T61R85XQeHIryeRBza2c,3226
|
|
274
|
+
nat/llm/litellm_llm.py,sha256=-q2PeOirP9soPUEs-nuqqCOADB4Y4E39v35ZOKXZzAA,3463
|
|
275
|
+
nat/llm/nim_llm.py,sha256=IqaDmgXkNkoRMamkGz-SQeIMLiL4CmZJdheUZj005jA,3087
|
|
276
|
+
nat/llm/openai_llm.py,sha256=adySEEbsoLouyXYCV_GluhwHaJpqj3fpslHZIGP-4xQ,2969
|
|
279
277
|
nat/llm/register.py,sha256=7xDYdK4w4opAwIjzDM5x7moJXT3QeEGaGGc_nDfY0i4,1090
|
|
280
278
|
nat/llm/utils/__init__.py,sha256=GUJrgGtpvyMUCjUBvR3faAdv-tZzbU9W-izgx9aMEQg,680
|
|
281
279
|
nat/llm/utils/env_config_value.py,sha256=kBVsv0pEokIAfDQx5omR7_FevFv_5fTPswcbnvhVT2c,3548
|
|
@@ -424,24 +422,23 @@ nat/tool/github_tools.py,sha256=Pn6p6ebLClNUy6MJIWf-Pl5NguMUT-IJ-bhmpJmvBrg,2190
|
|
|
424
422
|
nat/tool/nvidia_rag.py,sha256=cEHSc3CZwpd71YcOQngya-Ca_B6ZOb87Dmsoza0VhFY,4163
|
|
425
423
|
nat/tool/register.py,sha256=F1mQs9gI3Ee0EESFyBiTFZeqscY173ENQlfKcWZup0c,1208
|
|
426
424
|
nat/tool/retriever.py,sha256=FP5JL1vCQNrqaKz4F1up-osjxEPhxPFOyaScrgByc34,3877
|
|
427
|
-
nat/tool/server_tools.py,sha256=
|
|
425
|
+
nat/tool/server_tools.py,sha256=sxsgaF5ZjKIc3cSLldt1MDhY3kptrDnkP3kVYvVexfY,3679
|
|
428
426
|
nat/tool/code_execution/README.md,sha256=sl3YX4As95HX61XqTXOGnUcHBV1lla-OeuTnLI4qgng,4019
|
|
429
427
|
nat/tool/code_execution/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
430
|
-
nat/tool/code_execution/code_sandbox.py,sha256=
|
|
428
|
+
nat/tool/code_execution/code_sandbox.py,sha256=evu0n9oTc_MrrQuYbo1TP0sjnjLniRgCsOubO5G5WT4,10090
|
|
431
429
|
nat/tool/code_execution/register.py,sha256=zPFzYqaQhH2B3K8iildVYY_7RKgpoRNKdAo00KmBLQI,3322
|
|
432
|
-
nat/tool/code_execution/test_code_execution_sandbox.py,sha256=iyK9awJs6ST8fc_S3lNPye6It0DxSNp1UIrAUKPJ1h4,14776
|
|
433
430
|
nat/tool/code_execution/utils.py,sha256=__W-T1kaphFKYSc2AydQW8lCdvD7zAccarvs7XVFTtI,4194
|
|
434
431
|
nat/tool/code_execution/local_sandbox/.gitignore,sha256=BrV-H5osDtwwIx0eieoexolpnaJvc2DQLV15j95Qtyg,19
|
|
435
|
-
nat/tool/code_execution/local_sandbox/Dockerfile.sandbox,sha256=
|
|
432
|
+
nat/tool/code_execution/local_sandbox/Dockerfile.sandbox,sha256=mIbGFhhY-9ARQVK-tGmx-ft68wFIpB_RvM69V37OEAY,1557
|
|
436
433
|
nat/tool/code_execution/local_sandbox/__init__.py,sha256=k25Kqr_PrH4s0YCfzVzC9vaBAiu8yI428C4HX-qUcqA,615
|
|
437
|
-
nat/tool/code_execution/local_sandbox/local_sandbox_server.py,sha256=
|
|
438
|
-
nat/tool/code_execution/local_sandbox/sandbox.requirements.txt,sha256=
|
|
439
|
-
nat/tool/code_execution/local_sandbox/start_local_sandbox.sh,sha256=
|
|
434
|
+
nat/tool/code_execution/local_sandbox/local_sandbox_server.py,sha256=VGLY2ASmSSYNacGNdMSiedclwTCILNHs6PX45LxQ4Wc,7040
|
|
435
|
+
nat/tool/code_execution/local_sandbox/sandbox.requirements.txt,sha256=DL4dVNC8G-PMvr_x2C5AhwmeOpSKynpy4FNHWtWWtG4,69
|
|
436
|
+
nat/tool/code_execution/local_sandbox/start_local_sandbox.sh,sha256=BejvFn0uqI-BdBh3HqGWu7CngeJObiUFw-vAVQZA5VE,2260
|
|
440
437
|
nat/tool/memory_tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
441
438
|
nat/tool/memory_tools/add_memory_tool.py,sha256=N400PPvI37NUCMh5KcuoAL8khK8ecUQyfenahfjzbHQ,3368
|
|
442
439
|
nat/tool/memory_tools/delete_memory_tool.py,sha256=zMllkpC0of9qFPNuG9vkVOoydRblOViCQf0uSbqz0sE,2461
|
|
443
440
|
nat/tool/memory_tools/get_memory_tool.py,sha256=fcW6QE7bMZrpNK62et3sTw_QZ8cV9lXfEuDsm1-05bE,2768
|
|
444
|
-
nat/utils/__init__.py,sha256=
|
|
441
|
+
nat/utils/__init__.py,sha256=v6KZnvq8gT1VK-P_g5zHgoq9lhD4wvGwqCyb67aBkTo,2859
|
|
445
442
|
nat/utils/callable_utils.py,sha256=EIao6NhHRFEoBqYRC7aWoFqhlr2LeFT0XK-ac0coF9E,2475
|
|
446
443
|
nat/utils/debugging_utils.py,sha256=6M4JhbHDNDnfmSRGmHvT5IgEeWSHBore3VngdE_PMqc,1332
|
|
447
444
|
nat/utils/decorators.py,sha256=AoMip9zmqrZm5wovZQytNvzFfIlS3PQxSYcgYeoLhxA,8240
|
|
@@ -463,7 +460,7 @@ nat/utils/exception_handlers/automatic_retries.py,sha256=sgV_i8EEvWgeXxDRg3GGAxp
|
|
|
463
460
|
nat/utils/exception_handlers/schemas.py,sha256=EcNukc4-oASIX2mHAP-hH1up1roWnm99iY18P_v13D0,3800
|
|
464
461
|
nat/utils/io/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
465
462
|
nat/utils/io/model_processing.py,sha256=bEbH_tIgZQvPlEJKVV4kye_Y9UU96W4k2mKuckGErHA,936
|
|
466
|
-
nat/utils/io/yaml_tools.py,sha256=
|
|
463
|
+
nat/utils/io/yaml_tools.py,sha256=vYe9XgqELuwpOZjehJwiYnE6lDuKKC1yRq2sNab34zI,5987
|
|
467
464
|
nat/utils/reactive/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
468
465
|
nat/utils/reactive/observable.py,sha256=VPfkETHXnBNfxKho9luIm4hxCsI_Hx46GgnEO848AMc,2221
|
|
469
466
|
nat/utils/reactive/observer.py,sha256=y9aFhezP08TlV9Cx_S0mhShzdLzGQ9b_3PCcTsDxEOE,2508
|
|
@@ -475,10 +472,10 @@ nat/utils/reactive/base/observer_base.py,sha256=6BiQfx26EMumotJ3KoVcdmFBYR_fnAss
|
|
|
475
472
|
nat/utils/reactive/base/subject_base.py,sha256=UQOxlkZTIeeyYmG5qLtDpNf_63Y7p-doEeUA08_R8ME,2521
|
|
476
473
|
nat/utils/settings/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
477
474
|
nat/utils/settings/global_settings.py,sha256=9JaO6pxKT_Pjw6rxJRsRlFCXdVKCl_xUKU2QHZQWWNM,7294
|
|
478
|
-
nvidia_nat-1.4.
|
|
479
|
-
nvidia_nat-1.4.
|
|
480
|
-
nvidia_nat-1.4.
|
|
481
|
-
nvidia_nat-1.4.
|
|
482
|
-
nvidia_nat-1.4.
|
|
483
|
-
nvidia_nat-1.4.
|
|
484
|
-
nvidia_nat-1.4.
|
|
475
|
+
nvidia_nat-1.4.0a20251112.dist-info/licenses/LICENSE-3rd-party.txt,sha256=fOk5jMmCX9YoKWyYzTtfgl-SUy477audFC5hNY4oP7Q,284609
|
|
476
|
+
nvidia_nat-1.4.0a20251112.dist-info/licenses/LICENSE.md,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
|
|
477
|
+
nvidia_nat-1.4.0a20251112.dist-info/METADATA,sha256=CsMXqgjYtSUgVHr054qEnXii5qeGgUdVjwns5rUpzA0,10317
|
|
478
|
+
nvidia_nat-1.4.0a20251112.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
479
|
+
nvidia_nat-1.4.0a20251112.dist-info/entry_points.txt,sha256=4jCqjyETMpyoWbCBf4GalZU8I_wbstpzwQNezdAVbbo,698
|
|
480
|
+
nvidia_nat-1.4.0a20251112.dist-info/top_level.txt,sha256=lgJWLkigiVZuZ_O1nxVnD_ziYBwgpE2OStdaCduMEGc,8
|
|
481
|
+
nvidia_nat-1.4.0a20251112.dist-info/RECORD,,
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. 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
|
-
import re
|
|
17
|
-
|
|
18
|
-
from pydantic import BaseModel
|
|
19
|
-
|
|
20
|
-
from nat.data_models.gated_field_mixin import GatedFieldMixin
|
|
21
|
-
from nat.data_models.optimizable import OptimizableField
|
|
22
|
-
from nat.data_models.optimizable import SearchSpace
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
class TemperatureMixin(
|
|
26
|
-
BaseModel,
|
|
27
|
-
GatedFieldMixin,
|
|
28
|
-
field_name="temperature",
|
|
29
|
-
default_if_supported=0.0,
|
|
30
|
-
keys=("model_name", "model", "azure_deployment"),
|
|
31
|
-
unsupported=(re.compile(r"gpt-?5", re.IGNORECASE), ),
|
|
32
|
-
):
|
|
33
|
-
"""
|
|
34
|
-
Mixin class for temperature configuration. Unsupported on models like gpt-5.
|
|
35
|
-
|
|
36
|
-
Attributes:
|
|
37
|
-
temperature: Sampling temperature in [0, 1]. Defaults to 0.0 when supported on the model.
|
|
38
|
-
"""
|
|
39
|
-
temperature: float | None = OptimizableField(
|
|
40
|
-
default=None,
|
|
41
|
-
ge=0.0,
|
|
42
|
-
le=1.0,
|
|
43
|
-
description="Sampling temperature in [0, 1]. Defaults to 0.0 when supported on the model.",
|
|
44
|
-
space=SearchSpace(high=0.9, low=0.1, step=0.2))
|
nat/data_models/top_p_mixin.py
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. 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
|
-
import re
|
|
17
|
-
|
|
18
|
-
from pydantic import BaseModel
|
|
19
|
-
|
|
20
|
-
from nat.data_models.gated_field_mixin import GatedFieldMixin
|
|
21
|
-
from nat.data_models.optimizable import OptimizableField
|
|
22
|
-
from nat.data_models.optimizable import SearchSpace
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
class TopPMixin(
|
|
26
|
-
BaseModel,
|
|
27
|
-
GatedFieldMixin,
|
|
28
|
-
field_name="top_p",
|
|
29
|
-
default_if_supported=1.0,
|
|
30
|
-
keys=("model_name", "model", "azure_deployment"),
|
|
31
|
-
unsupported=(re.compile(r"gpt-?5", re.IGNORECASE), ),
|
|
32
|
-
):
|
|
33
|
-
"""
|
|
34
|
-
Mixin class for top-p configuration. Unsupported on models like gpt-5.
|
|
35
|
-
|
|
36
|
-
Attributes:
|
|
37
|
-
top_p: Top-p for distribution sampling. Defaults to 1.0 when supported on the model.
|
|
38
|
-
"""
|
|
39
|
-
top_p: float | None = OptimizableField(
|
|
40
|
-
default=None,
|
|
41
|
-
ge=0.0,
|
|
42
|
-
le=1.0,
|
|
43
|
-
description="Top-p for distribution sampling. Defaults to 1.0 when supported on the model.",
|
|
44
|
-
space=SearchSpace(high=1.0, low=0.5, step=0.1))
|