nvidia-nat-ragaai 1.3.0a20250923__py3-none-any.whl → 1.4.0a20251124__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/plugins/ragaai/mixin/ragaai_catalyst_mixin.py +20 -16
- nat/plugins/ragaai/ragaai_catalyst_exporter.py +2 -2
- nat/plugins/ragaai/register.py +6 -4
- {nvidia_nat_ragaai-1.3.0a20250923.dist-info → nvidia_nat_ragaai-1.4.0a20251124.dist-info}/METADATA +10 -2
- nvidia_nat_ragaai-1.4.0a20251124.dist-info/RECORD +13 -0
- nvidia_nat_ragaai-1.4.0a20251124.dist-info/licenses/LICENSE-3rd-party.txt +5478 -0
- nvidia_nat_ragaai-1.4.0a20251124.dist-info/licenses/LICENSE.md +201 -0
- nvidia_nat_ragaai-1.3.0a20250923.dist-info/RECORD +0 -11
- {nvidia_nat_ragaai-1.3.0a20250923.dist-info → nvidia_nat_ragaai-1.4.0a20251124.dist-info}/WHEEL +0 -0
- {nvidia_nat_ragaai-1.3.0a20250923.dist-info → nvidia_nat_ragaai-1.4.0a20251124.dist-info}/entry_points.txt +0 -0
- {nvidia_nat_ragaai-1.3.0a20250923.dist-info → nvidia_nat_ragaai-1.4.0a20251124.dist-info}/top_level.txt +0 -0
|
@@ -56,7 +56,7 @@ class RAGATraceExporterOptWrite(RAGATraceExporter):
|
|
|
56
56
|
self.user_gt,
|
|
57
57
|
self.external_id)
|
|
58
58
|
except Exception as e:
|
|
59
|
-
|
|
59
|
+
logger.exception("Error in convert_json_format function: %s: %s", trace_id, e, exc_info=True)
|
|
60
60
|
return None
|
|
61
61
|
|
|
62
62
|
try:
|
|
@@ -64,7 +64,7 @@ class RAGATraceExporterOptWrite(RAGATraceExporter):
|
|
|
64
64
|
if interactions and 'workflow' in interactions:
|
|
65
65
|
ragaai_trace["workflow"] = interactions['workflow']
|
|
66
66
|
except Exception as e:
|
|
67
|
-
|
|
67
|
+
logger.exception("Error in format_interactions function: %s: %s", trace_id, e, exc_info=True)
|
|
68
68
|
return None
|
|
69
69
|
|
|
70
70
|
try:
|
|
@@ -72,20 +72,23 @@ class RAGATraceExporterOptWrite(RAGATraceExporter):
|
|
|
72
72
|
files_to_zip = self.files_to_zip or []
|
|
73
73
|
hash_id, zip_path = zip_list_of_unique_files(files_to_zip, output_dir=self.tmp_dir)
|
|
74
74
|
except Exception as e:
|
|
75
|
-
|
|
75
|
+
logger.exception("Error in zip_list_of_unique_files function: %s: %s", trace_id, e, exc_info=True)
|
|
76
76
|
return None
|
|
77
77
|
|
|
78
78
|
try:
|
|
79
79
|
ragaai_trace["metadata"]["system_info"] = asdict(self.system_monitor.get_system_info())
|
|
80
80
|
ragaai_trace["metadata"]["resources"] = asdict(self.system_monitor.get_resources())
|
|
81
81
|
except Exception as e:
|
|
82
|
-
|
|
82
|
+
logger.exception("Error in get_system_info or get_resources function: %s: %s",
|
|
83
|
+
trace_id,
|
|
84
|
+
e,
|
|
85
|
+
exc_info=True)
|
|
83
86
|
return None
|
|
84
87
|
|
|
85
88
|
try:
|
|
86
89
|
ragaai_trace["metadata"]["system_info"]["source_code"] = hash_id
|
|
87
90
|
except Exception as e:
|
|
88
|
-
|
|
91
|
+
logger.exception("Error in adding source code hash: %s: %s", trace_id, e, exc_info=True)
|
|
89
92
|
return None
|
|
90
93
|
|
|
91
94
|
try:
|
|
@@ -95,14 +98,14 @@ class RAGATraceExporterOptWrite(RAGATraceExporter):
|
|
|
95
98
|
if "end_time" in ragaai_trace:
|
|
96
99
|
ragaai_trace["data"][0]["end_time"] = ragaai_trace["end_time"]
|
|
97
100
|
except Exception as e:
|
|
98
|
-
|
|
101
|
+
logger.exception("Error in adding start_time or end_time: %s: %s", trace_id, e, exc_info=True)
|
|
99
102
|
return None
|
|
100
103
|
|
|
101
104
|
try:
|
|
102
105
|
if hasattr(self, 'project_name'):
|
|
103
106
|
ragaai_trace["project_name"] = self.project_name
|
|
104
107
|
except Exception as e:
|
|
105
|
-
|
|
108
|
+
logger.exception("Error in adding project name: %s: %s", trace_id, e, exc_info=True)
|
|
106
109
|
return None
|
|
107
110
|
|
|
108
111
|
try:
|
|
@@ -110,7 +113,7 @@ class RAGATraceExporterOptWrite(RAGATraceExporter):
|
|
|
110
113
|
if hasattr(self, 'tracer_type'):
|
|
111
114
|
ragaai_trace["tracer_type"] = self.tracer_type
|
|
112
115
|
except Exception as e:
|
|
113
|
-
|
|
116
|
+
logger.exception("Error in adding tracer type: %s: %s", trace_id, e, exc_info=True)
|
|
114
117
|
return None
|
|
115
118
|
|
|
116
119
|
# Add user passed metadata to the trace
|
|
@@ -127,7 +130,7 @@ class RAGATraceExporterOptWrite(RAGATraceExporter):
|
|
|
127
130
|
|
|
128
131
|
logger.debug("Completed adding user passed metadata")
|
|
129
132
|
except Exception as e:
|
|
130
|
-
|
|
133
|
+
logger.exception("Error in adding metadata: %s: %s", trace_id, e, exc_info=True)
|
|
131
134
|
return None
|
|
132
135
|
|
|
133
136
|
try:
|
|
@@ -140,12 +143,12 @@ class RAGATraceExporterOptWrite(RAGATraceExporter):
|
|
|
140
143
|
with open(os.path.join(os.getcwd(), 'rag_agent_traces.json'), 'w', encoding="utf-8") as f:
|
|
141
144
|
json.dump(ragaai_trace, f, cls=TracerJSONEncoder, indent=2)
|
|
142
145
|
except Exception as e:
|
|
143
|
-
|
|
146
|
+
logger.exception("Error in saving trace json: %s: %s", trace_id, e, exc_info=True)
|
|
144
147
|
return None
|
|
145
148
|
|
|
146
149
|
return {'trace_file_path': trace_file_path, 'code_zip_path': zip_path, 'hash_id': hash_id}
|
|
147
150
|
except Exception as e:
|
|
148
|
-
|
|
151
|
+
logger.exception("Error converting trace %s: %s", trace_id, str(e), exc_info=True)
|
|
149
152
|
return None
|
|
150
153
|
|
|
151
154
|
|
|
@@ -185,7 +188,8 @@ class RagaAICatalystMixin:
|
|
|
185
188
|
|
|
186
189
|
This mixin is designed to be used with OtelSpanExporter as a base class:
|
|
187
190
|
|
|
188
|
-
Example
|
|
191
|
+
Example::
|
|
192
|
+
|
|
189
193
|
class MyCatalystExporter(OtelSpanExporter, RagaAICatalystMixin):
|
|
190
194
|
def __init__(self, base_url, access_key, secret_key, project, dataset, **kwargs):
|
|
191
195
|
super().__init__(base_url=base_url, access_key=access_key,
|
|
@@ -211,9 +215,9 @@ class RagaAICatalystMixin:
|
|
|
211
215
|
project: RagaAI Catalyst project name.
|
|
212
216
|
dataset: RagaAI Catalyst dataset name.
|
|
213
217
|
tracer_type: RagaAI Catalyst tracer type.
|
|
214
|
-
debug_mode: When False (default), creates local rag_agent_traces.json file.
|
|
215
|
-
|
|
216
|
-
|
|
218
|
+
debug_mode: When False (default), creates local rag_agent_traces.json file. When True, skips local file
|
|
219
|
+
creation for cleaner operation.
|
|
220
|
+
kwargs: Additional keyword arguments passed to parent classes.
|
|
217
221
|
"""
|
|
218
222
|
logger.info("RagaAICatalystMixin initialized with debug_mode=%s", debug_mode)
|
|
219
223
|
|
|
@@ -241,4 +245,4 @@ class RagaAICatalystMixin:
|
|
|
241
245
|
loop = asyncio.get_event_loop()
|
|
242
246
|
await loop.run_in_executor(None, lambda: self._exporter.export(spans)) # type: ignore[arg-type]
|
|
243
247
|
except Exception as e:
|
|
244
|
-
logger.
|
|
248
|
+
logger.exception("Error exporting spans: %s", e, exc_info=True)
|
|
@@ -42,8 +42,8 @@ class RagaAICatalystExporter(RagaAICatalystMixin, OtelSpanExporter):
|
|
|
42
42
|
project: Project name for trace grouping
|
|
43
43
|
dataset: Dataset name for trace organization
|
|
44
44
|
tracer_type: RagaAI Catalyst tracer type.
|
|
45
|
-
debug_mode: When False (default), creates local rag_agent_traces.json file.
|
|
46
|
-
|
|
45
|
+
debug_mode: When False (default), creates local rag_agent_traces.json file. When True, skips local file
|
|
46
|
+
creation for cleaner operation.
|
|
47
47
|
batch_size: Batch size for exporting
|
|
48
48
|
flush_interval: Flush interval for exporting
|
|
49
49
|
max_queue_size: Maximum queue size for exporting
|
nat/plugins/ragaai/register.py
CHANGED
|
@@ -19,6 +19,8 @@ from pydantic import Field
|
|
|
19
19
|
|
|
20
20
|
from nat.builder.builder import Builder
|
|
21
21
|
from nat.cli.register_workflow import register_telemetry_exporter
|
|
22
|
+
from nat.data_models.common import SerializableSecretStr
|
|
23
|
+
from nat.data_models.common import get_secret_value
|
|
22
24
|
from nat.data_models.telemetry_exporter import TelemetryExporterBaseConfig
|
|
23
25
|
from nat.observability.mixin.batch_config_mixin import BatchConfigMixin
|
|
24
26
|
from nat.observability.mixin.collector_config_mixin import CollectorConfigMixin
|
|
@@ -29,8 +31,8 @@ logger = logging.getLogger(__name__)
|
|
|
29
31
|
class CatalystTelemetryExporter(BatchConfigMixin, CollectorConfigMixin, TelemetryExporterBaseConfig, name="catalyst"):
|
|
30
32
|
"""A telemetry exporter to transmit traces to RagaAI catalyst."""
|
|
31
33
|
endpoint: str = Field(description="The RagaAI Catalyst endpoint", default="https://catalyst.raga.ai/api")
|
|
32
|
-
access_key:
|
|
33
|
-
secret_key:
|
|
34
|
+
access_key: SerializableSecretStr = Field(description="The RagaAI Catalyst API access key", default="")
|
|
35
|
+
secret_key: SerializableSecretStr = Field(description="The RagaAI Catalyst API secret key", default="")
|
|
34
36
|
dataset: str | None = Field(description="The RagaAI Catalyst dataset name", default=None)
|
|
35
37
|
tracer_type: str = Field(description="The RagaAI Catalyst tracer type", default="agentic/nemo-framework")
|
|
36
38
|
|
|
@@ -49,8 +51,8 @@ async def catalyst_telemetry_exporter(config: CatalystTelemetryExporter, builder
|
|
|
49
51
|
|
|
50
52
|
from nat.plugins.ragaai.ragaai_catalyst_exporter import RagaAICatalystExporter
|
|
51
53
|
|
|
52
|
-
access_key = config.access_key
|
|
53
|
-
secret_key = config.secret_key
|
|
54
|
+
access_key = get_secret_value(config.access_key) if config.access_key else os.environ.get("CATALYST_ACCESS_KEY")
|
|
55
|
+
secret_key = get_secret_value(config.secret_key) if config.secret_key else os.environ.get("CATALYST_SECRET_KEY")
|
|
54
56
|
endpoint = config.endpoint or os.environ.get("CATALYST_ENDPOINT")
|
|
55
57
|
|
|
56
58
|
assert endpoint is not None, "catalyst endpoint is not set"
|
{nvidia_nat_ragaai-1.3.0a20250923.dist-info → nvidia_nat_ragaai-1.4.0a20251124.dist-info}/METADATA
RENAMED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nvidia-nat-ragaai
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.0a20251124
|
|
4
4
|
Summary: Subpackage for RagaAI Catalyst integration in NeMo Agent toolkit
|
|
5
|
+
Author: NVIDIA Corporation
|
|
6
|
+
Maintainer: NVIDIA Corporation
|
|
7
|
+
License: Apache-2.0
|
|
8
|
+
Project-URL: documentation, https://docs.nvidia.com/nemo/agent-toolkit/latest/
|
|
9
|
+
Project-URL: source, https://github.com/NVIDIA/NeMo-Agent-Toolkit
|
|
5
10
|
Keywords: ai,observability,ragaai catalyst
|
|
6
11
|
Classifier: Programming Language :: Python
|
|
7
12
|
Classifier: Programming Language :: Python :: 3.11
|
|
@@ -9,8 +14,11 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
9
14
|
Classifier: Programming Language :: Python :: 3.13
|
|
10
15
|
Requires-Python: <3.14,>=3.11
|
|
11
16
|
Description-Content-Type: text/markdown
|
|
12
|
-
|
|
17
|
+
License-File: LICENSE-3rd-party.txt
|
|
18
|
+
License-File: LICENSE.md
|
|
19
|
+
Requires-Dist: nvidia-nat[litellm,opentelemetry]==v1.4.0a20251124
|
|
13
20
|
Requires-Dist: ragaai-catalyst<2.3,>=2.2.0
|
|
21
|
+
Dynamic: license-file
|
|
14
22
|
|
|
15
23
|
<!--
|
|
16
24
|
SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
nat/meta/pypi.md,sha256=0pjv0kFWJXwkDfjOfF0atoxFZLL9Anh_mnHVR8PUB0I,1112
|
|
2
|
+
nat/plugins/ragaai/__init__.py,sha256=Xs1JQ16L9btwreh4pdGKwskffAw1YFO48jKrU4ib_7c,685
|
|
3
|
+
nat/plugins/ragaai/ragaai_catalyst_exporter.py,sha256=6ycaprMCTbPgzzdEMYu3FsnvePj4BjwBN3Pu1mGbYF4,2958
|
|
4
|
+
nat/plugins/ragaai/register.py,sha256=0-Lgxx6rQF3Bp0JCsj2R3nxf1qTr5caBD4PEC5GM-6Q,3988
|
|
5
|
+
nat/plugins/ragaai/mixin/__init__.py,sha256=Xs1JQ16L9btwreh4pdGKwskffAw1YFO48jKrU4ib_7c,685
|
|
6
|
+
nat/plugins/ragaai/mixin/ragaai_catalyst_mixin.py,sha256=4XXlfInqMon6RdqizXKtjGedjqimvpxmNaAXX6fKBoc,11331
|
|
7
|
+
nvidia_nat_ragaai-1.4.0a20251124.dist-info/licenses/LICENSE-3rd-party.txt,sha256=fOk5jMmCX9YoKWyYzTtfgl-SUy477audFC5hNY4oP7Q,284609
|
|
8
|
+
nvidia_nat_ragaai-1.4.0a20251124.dist-info/licenses/LICENSE.md,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
|
|
9
|
+
nvidia_nat_ragaai-1.4.0a20251124.dist-info/METADATA,sha256=_RQUI5jtke2Sea799859Eu3RwwY0cSlYjU3efhu6tCs,1981
|
|
10
|
+
nvidia_nat_ragaai-1.4.0a20251124.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
11
|
+
nvidia_nat_ragaai-1.4.0a20251124.dist-info/entry_points.txt,sha256=UhynvDN2vlLQB-hmjrvXnbTSyAe8sUhT2dFb-16Hum8,58
|
|
12
|
+
nvidia_nat_ragaai-1.4.0a20251124.dist-info/top_level.txt,sha256=8-CJ2cP6-f0ZReXe5Hzqp-5pvzzHz-5Ds5H2bGqh1-U,4
|
|
13
|
+
nvidia_nat_ragaai-1.4.0a20251124.dist-info/RECORD,,
|