ragaai-catalyst 2.1.7b0__py3-none-any.whl → 2.1.7b1__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.
- ragaai_catalyst/tracers/exporters/dynamic_trace_exporter.py +14 -2
- ragaai_catalyst/tracers/exporters/ragaai_trace_exporter.py +3 -2
- ragaai_catalyst/tracers/tracer.py +4 -1
- {ragaai_catalyst-2.1.7b0.dist-info → ragaai_catalyst-2.1.7b1.dist-info}/METADATA +1 -1
- {ragaai_catalyst-2.1.7b0.dist-info → ragaai_catalyst-2.1.7b1.dist-info}/RECORD +8 -8
- {ragaai_catalyst-2.1.7b0.dist-info → ragaai_catalyst-2.1.7b1.dist-info}/WHEEL +0 -0
- {ragaai_catalyst-2.1.7b0.dist-info → ragaai_catalyst-2.1.7b1.dist-info}/licenses/LICENSE +0 -0
- {ragaai_catalyst-2.1.7b0.dist-info → ragaai_catalyst-2.1.7b1.dist-info}/top_level.txt +0 -0
@@ -14,7 +14,7 @@ class DynamicTraceExporter(SpanExporter):
|
|
14
14
|
certain properties to be updated dynamically during execution.
|
15
15
|
"""
|
16
16
|
|
17
|
-
def __init__(self, tracer_type, files_to_zip, project_name, project_id, dataset_name, user_details, base_url, custom_model_cost, timeout=120, post_processor = None):
|
17
|
+
def __init__(self, tracer_type, files_to_zip, project_name, project_id, dataset_name, user_details, base_url, custom_model_cost, timeout=120, post_processor = None, max_upload_workers = 30):
|
18
18
|
"""
|
19
19
|
Initialize the DynamicTraceExporter.
|
20
20
|
|
@@ -27,6 +27,7 @@ class DynamicTraceExporter(SpanExporter):
|
|
27
27
|
user_details: User details
|
28
28
|
base_url: Base URL for API
|
29
29
|
post_processor: Post processing function before uploading trace
|
30
|
+
max_upload_workers: Maximum number of upload workers
|
30
31
|
"""
|
31
32
|
self._exporter = RAGATraceExporter(
|
32
33
|
tracer_type=tracer_type,
|
@@ -38,7 +39,8 @@ class DynamicTraceExporter(SpanExporter):
|
|
38
39
|
base_url=base_url,
|
39
40
|
custom_model_cost=custom_model_cost,
|
40
41
|
timeout=timeout,
|
41
|
-
post_processor= post_processor
|
42
|
+
post_processor= post_processor,
|
43
|
+
max_upload_workers = max_upload_workers
|
42
44
|
)
|
43
45
|
|
44
46
|
# Store the initial values
|
@@ -50,6 +52,7 @@ class DynamicTraceExporter(SpanExporter):
|
|
50
52
|
self._base_url = base_url
|
51
53
|
self._custom_model_cost = custom_model_cost
|
52
54
|
self._post_processor = post_processor
|
55
|
+
self._max_upload_workers = max_upload_workers
|
53
56
|
|
54
57
|
|
55
58
|
def export(self, spans):
|
@@ -107,6 +110,7 @@ class DynamicTraceExporter(SpanExporter):
|
|
107
110
|
self._exporter.base_url = self._base_url
|
108
111
|
self._exporter.custom_model_cost = self._custom_model_cost
|
109
112
|
self._exporter.post_processor = self._post_processor
|
113
|
+
self._exporter.max_upload_workers = self._max_upload_workers
|
110
114
|
|
111
115
|
# Getter and setter methods for dynamic properties
|
112
116
|
|
@@ -165,3 +169,11 @@ class DynamicTraceExporter(SpanExporter):
|
|
165
169
|
@custom_model_cost.setter
|
166
170
|
def custom_model_cost(self, value):
|
167
171
|
self._custom_model_cost = value
|
172
|
+
|
173
|
+
@property
|
174
|
+
def max_upload_workers(self):
|
175
|
+
return self._max_upload_workers
|
176
|
+
|
177
|
+
@max_upload_workers.setter
|
178
|
+
def max_upload_workers(self, value):
|
179
|
+
self._max_upload_workers = value
|
@@ -26,7 +26,7 @@ logging_level = (
|
|
26
26
|
|
27
27
|
|
28
28
|
class RAGATraceExporter(SpanExporter):
|
29
|
-
def __init__(self, tracer_type, files_to_zip, project_name, project_id, dataset_name, user_details, base_url, custom_model_cost, timeout=120, post_processor = None):
|
29
|
+
def __init__(self, tracer_type, files_to_zip, project_name, project_id, dataset_name, user_details, base_url, custom_model_cost, timeout=120, post_processor = None, max_upload_workers = 30):
|
30
30
|
self.trace_spans = dict()
|
31
31
|
self.tmp_dir = tempfile.gettempdir()
|
32
32
|
self.tracer_type = tracer_type
|
@@ -40,6 +40,7 @@ class RAGATraceExporter(SpanExporter):
|
|
40
40
|
self.system_monitor = SystemMonitor(dataset_name)
|
41
41
|
self.timeout = timeout
|
42
42
|
self.post_processor = post_processor
|
43
|
+
self.max_upload_workers = max_upload_workers
|
43
44
|
|
44
45
|
def export(self, spans):
|
45
46
|
for span in spans:
|
@@ -189,7 +190,7 @@ class RAGATraceExporter(SpanExporter):
|
|
189
190
|
json.dump(ragaai_trace, f, indent=2)
|
190
191
|
|
191
192
|
# Create a ThreadPoolExecutor with max_workers=30
|
192
|
-
with concurrent.futures.ThreadPoolExecutor(max_workers=
|
193
|
+
with concurrent.futures.ThreadPoolExecutor(max_workers=self.max_upload_workers) as executor:
|
193
194
|
# Create a partial function with all the necessary arguments
|
194
195
|
upload_func = partial(
|
195
196
|
UploadTraces(
|
@@ -59,6 +59,7 @@ class Tracer(AgenticTracing):
|
|
59
59
|
},
|
60
60
|
interval_time=2,
|
61
61
|
# auto_instrumentation=True/False # to control automatic instrumentation of everything
|
62
|
+
max_upload_workers=30
|
62
63
|
|
63
64
|
):
|
64
65
|
"""
|
@@ -141,6 +142,7 @@ class Tracer(AgenticTracing):
|
|
141
142
|
self.user_context = "" # Initialize user_context to store context from add_context
|
142
143
|
self.file_tracker = TrackName()
|
143
144
|
self.post_processor = None
|
145
|
+
self.max_upload_workers = max_upload_workers
|
144
146
|
|
145
147
|
try:
|
146
148
|
response = requests.get(
|
@@ -763,7 +765,8 @@ class Tracer(AgenticTracing):
|
|
763
765
|
base_url=self.base_url,
|
764
766
|
custom_model_cost=self.model_custom_cost,
|
765
767
|
timeout = self.timeout,
|
766
|
-
post_processor= self.post_processor
|
768
|
+
post_processor= self.post_processor,
|
769
|
+
max_upload_workers = self.max_upload_workers
|
767
770
|
)
|
768
771
|
|
769
772
|
# Set up tracer provider
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ragaai_catalyst
|
3
|
-
Version: 2.1.
|
3
|
+
Version: 2.1.7b1
|
4
4
|
Summary: RAGA AI CATALYST
|
5
5
|
Author-email: Kiran Scaria <kiran.scaria@raga.ai>, Kedar Gaikwad <kedar.gaikwad@raga.ai>, Dushyant Mahajan <dushyant.mahajan@raga.ai>, Siddhartha Kosti <siddhartha.kosti@raga.ai>, Ritika Goel <ritika.goel@raga.ai>, Vijay Chaurasia <vijay.chaurasia@raga.ai>, Tushar Kumar <tushar.kumar@raga.ai>
|
6
6
|
Requires-Python: <3.13,>=3.10
|
@@ -31,7 +31,7 @@ ragaai_catalyst/tracers/distributed.py,sha256=MwlBwIxCAng-OI-7Ove_rkE1mTLeuW4Jw-
|
|
31
31
|
ragaai_catalyst/tracers/langchain_callback.py,sha256=CB75zzG3-DkYTELj0vI1MOHQTY0MuQJfoHIXz9Cl8S8,34568
|
32
32
|
ragaai_catalyst/tracers/llamaindex_callback.py,sha256=ZY0BJrrlz-P9Mg2dX-ZkVKG3gSvzwqBtk7JL_05MiYA,14028
|
33
33
|
ragaai_catalyst/tracers/llamaindex_instrumentation.py,sha256=Ys_jLkvVqo12bKgXDmkp4TxJu9HkBATrFE8cIcTYxWw,14329
|
34
|
-
ragaai_catalyst/tracers/tracer.py,sha256=
|
34
|
+
ragaai_catalyst/tracers/tracer.py,sha256=YZB3l55EXLog_rrAMb2jc5pvhQ63qtCc9UZcY7Yqmxo,37134
|
35
35
|
ragaai_catalyst/tracers/upload_traces.py,sha256=PEE_JhAmOAMKyb-pl4ZoFWhIePxJm1zs93crrk94iEg,5887
|
36
36
|
ragaai_catalyst/tracers/agentic_tracing/README.md,sha256=X4QwLb7-Jg7GQMIXj-SerZIgDETfw-7VgYlczOR8ZeQ,4508
|
37
37
|
ragaai_catalyst/tracers/agentic_tracing/__init__.py,sha256=yf6SKvOPSpH-9LiKaoLKXwqj5sez8F_5wkOb91yp0oE,260
|
@@ -74,10 +74,10 @@ ragaai_catalyst/tracers/agentic_tracing/utils/trace_utils.py,sha256=W7Nw-IpugejI
|
|
74
74
|
ragaai_catalyst/tracers/agentic_tracing/utils/unique_decorator.py,sha256=G027toV-Km20JjKrc-Y_PilQ8ABEKrBvvzgLTnqVg7I,5819
|
75
75
|
ragaai_catalyst/tracers/agentic_tracing/utils/zip_list_of_unique_files.py,sha256=4TeCGsFF26249fV6dJHLTZDrRa93SG9oer4rudoF8Y4,19443
|
76
76
|
ragaai_catalyst/tracers/exporters/__init__.py,sha256=wQbaqyeIjVZxYprHCKZ9BeiqxeXYBKjzEgP79LWNxCU,293
|
77
|
-
ragaai_catalyst/tracers/exporters/dynamic_trace_exporter.py,sha256=
|
77
|
+
ragaai_catalyst/tracers/exporters/dynamic_trace_exporter.py,sha256=eR_bbWMg_q8g9SzutrOZA24Bptr0BWpauZKVWfiCM1c,5910
|
78
78
|
ragaai_catalyst/tracers/exporters/file_span_exporter.py,sha256=RgGteu-NVGprXKkynvyIO5yOjpbtA41R3W_NzCjnkwE,6445
|
79
79
|
ragaai_catalyst/tracers/exporters/raga_exporter.py,sha256=6xvjWXyh8XPkHKSLLmAZUQSvwuyY17ov8pv2VdfI0qA,17875
|
80
|
-
ragaai_catalyst/tracers/exporters/ragaai_trace_exporter.py,sha256=
|
80
|
+
ragaai_catalyst/tracers/exporters/ragaai_trace_exporter.py,sha256=jfJr836ahLyo2qYrP5Hmdx0XkZt8lEhlKGHIP7PNmGs,11463
|
81
81
|
ragaai_catalyst/tracers/instrumentators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
82
82
|
ragaai_catalyst/tracers/utils/__init__.py,sha256=KeMaZtYaTojilpLv65qH08QmpYclfpacDA0U3wg6Ybw,64
|
83
83
|
ragaai_catalyst/tracers/utils/convert_langchain_callbacks_output.py,sha256=e0URuRWCdzpxuBLfL82FOTMjbRuDAkW8aIRi7s7Nocc,1655
|
@@ -88,8 +88,8 @@ ragaai_catalyst/tracers/utils/model_prices_and_context_window_backup.json,sha256
|
|
88
88
|
ragaai_catalyst/tracers/utils/rag_trace_json_converter.py,sha256=XSanJ3ChRn_Nqj5mlJhy-jFUCAhkw6lBuhhzUx6Mo9k,11239
|
89
89
|
ragaai_catalyst/tracers/utils/trace_json_converter.py,sha256=E0_QfciQMMpCtQYrNB4l8HJhlaFalr5bkMqkVRgQahY,14073
|
90
90
|
ragaai_catalyst/tracers/utils/utils.py,sha256=ViygfJ7vZ7U0CTSA1lbxVloHp4NSlmfDzBRNCJuMhis,2374
|
91
|
-
ragaai_catalyst-2.1.
|
92
|
-
ragaai_catalyst-2.1.
|
93
|
-
ragaai_catalyst-2.1.
|
94
|
-
ragaai_catalyst-2.1.
|
95
|
-
ragaai_catalyst-2.1.
|
91
|
+
ragaai_catalyst-2.1.7b1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
92
|
+
ragaai_catalyst-2.1.7b1.dist-info/METADATA,sha256=t0urAW0WO0OddkYhXjrQt925JQcbdqPWKnv0urR-mwc,22139
|
93
|
+
ragaai_catalyst-2.1.7b1.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
94
|
+
ragaai_catalyst-2.1.7b1.dist-info/top_level.txt,sha256=HpgsdRgEJMk8nqrU6qdCYk3di7MJkDL0B19lkc7dLfM,16
|
95
|
+
ragaai_catalyst-2.1.7b1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|