ragaai-catalyst 1.0.8.1__py3-none-any.whl → 2.0__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/__init__.py +2 -1
- ragaai_catalyst/dataset.py +186 -126
- ragaai_catalyst/evaluation.py +369 -0
- ragaai_catalyst/experiment.py +1 -1
- ragaai_catalyst/prompt_manager.py +112 -54
- ragaai_catalyst/ragaai_catalyst.py +44 -17
- ragaai_catalyst/tracers/exporters/file_span_exporter.py +16 -0
- ragaai_catalyst/tracers/exporters/raga_exporter.py +50 -27
- ragaai_catalyst/tracers/tracer.py +33 -26
- {ragaai_catalyst-1.0.8.1.dist-info → ragaai_catalyst-2.0.dist-info}/METADATA +13 -14
- ragaai_catalyst-2.0.dist-info/RECORD +23 -0
- ragaai_catalyst-1.0.8.1.dist-info/RECORD +0 -22
- {ragaai_catalyst-1.0.8.1.dist-info → ragaai_catalyst-2.0.dist-info}/WHEEL +0 -0
- {ragaai_catalyst-1.0.8.1.dist-info → ragaai_catalyst-2.0.dist-info}/top_level.txt +0 -0
@@ -25,9 +25,11 @@ logger = logging.getLogger(__name__)
|
|
25
25
|
|
26
26
|
class Tracer:
|
27
27
|
NUM_PROJECTS = 100
|
28
|
+
TIMEOUT = 10
|
28
29
|
def __init__(
|
29
30
|
self,
|
30
31
|
project_name,
|
32
|
+
dataset_name,
|
31
33
|
tracer_type=None,
|
32
34
|
pipeline=None,
|
33
35
|
metadata=None,
|
@@ -49,38 +51,43 @@ class Tracer:
|
|
49
51
|
None
|
50
52
|
"""
|
51
53
|
self.project_name = project_name
|
54
|
+
self.dataset_name = dataset_name
|
52
55
|
self.tracer_type = tracer_type
|
53
56
|
self.metadata = self._improve_metadata(metadata, tracer_type)
|
54
57
|
self.pipeline = pipeline
|
55
58
|
self.description = description
|
56
59
|
self.upload_timeout = upload_timeout
|
60
|
+
self.base_url = f"{RagaAICatalyst.BASE_URL}"
|
61
|
+
self.timeout = 10
|
62
|
+
self.num_projects = 100
|
57
63
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
64
|
+
try:
|
65
|
+
response = requests.get(
|
66
|
+
f"{self.base_url}/v2/llm/projects?size={self.num_projects}",
|
67
|
+
headers={
|
68
|
+
"Authorization": f'Bearer {os.getenv("RAGAAI_CATALYST_TOKEN")}',
|
69
|
+
},
|
70
|
+
timeout=self.timeout,
|
71
|
+
)
|
72
|
+
response.raise_for_status()
|
73
|
+
logger.debug("Projects list retrieved successfully")
|
74
|
+
|
75
|
+
project_list = [
|
76
|
+
project["name"] for project in response.json()["data"]["content"]
|
77
|
+
]
|
78
|
+
if project_name not in project_list:
|
79
|
+
raise ValueError("Project not found. Please enter a valid project name")
|
80
|
+
|
81
|
+
self.project_id = [
|
82
|
+
project["id"] for project in response.json()["data"]["content"] if project["name"] == project_name
|
83
|
+
][0]
|
84
|
+
|
85
|
+
except requests.exceptions.RequestException as e:
|
86
|
+
logger.error(f"Failed to retrieve projects list: {e}")
|
87
|
+
raise
|
88
|
+
|
89
|
+
|
90
|
+
self.raga_client = RagaExporter(project_name=self.project_name, dataset_name=self.dataset_name)
|
84
91
|
|
85
92
|
self._tracer_provider = self._setup_provider()
|
86
93
|
self._instrumentor = self._setup_instrumentor(tracer_type)
|
@@ -1,26 +1,25 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: ragaai_catalyst
|
3
|
-
Version:
|
3
|
+
Version: 2.0
|
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>
|
6
6
|
Requires-Python: >=3.9
|
7
7
|
Description-Content-Type: text/markdown
|
8
8
|
Requires-Dist: aiohttp>=3.10.2
|
9
|
-
Requires-Dist: opentelemetry-api==1.
|
10
|
-
Requires-Dist: opentelemetry-sdk==1.
|
11
|
-
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc==1.
|
12
|
-
Requires-Dist: opentelemetry-instrumentation==0.
|
13
|
-
Requires-Dist: opentelemetry-instrumentation-fastapi==0.
|
14
|
-
Requires-Dist: opentelemetry-instrumentation-asgi==0.
|
15
|
-
Requires-Dist: opentelemetry-semantic-conventions==0.
|
16
|
-
Requires-Dist: opentelemetry-util-http==0.
|
17
|
-
Requires-Dist: opentelemetry-instrumentation-langchain
|
18
|
-
Requires-Dist: opentelemetry-instrumentation-openai
|
19
|
-
Requires-Dist: langchain-core~=0.
|
20
|
-
Requires-Dist: langchain~=0.
|
9
|
+
Requires-Dist: opentelemetry-api==1.27.0
|
10
|
+
Requires-Dist: opentelemetry-sdk==1.27.0
|
11
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc==1.27.0
|
12
|
+
Requires-Dist: opentelemetry-instrumentation==0.48b0
|
13
|
+
Requires-Dist: opentelemetry-instrumentation-fastapi==0.48b0
|
14
|
+
Requires-Dist: opentelemetry-instrumentation-asgi==0.48b0
|
15
|
+
Requires-Dist: opentelemetry-semantic-conventions==0.48b0
|
16
|
+
Requires-Dist: opentelemetry-util-http==0.48b0
|
17
|
+
Requires-Dist: opentelemetry-instrumentation-langchain==0.30.0
|
18
|
+
Requires-Dist: opentelemetry-instrumentation-openai==0.30.0
|
19
|
+
Requires-Dist: langchain-core~=0.3.6
|
20
|
+
Requires-Dist: langchain~=0.3.1
|
21
21
|
Requires-Dist: openai>=1.35.10
|
22
22
|
Requires-Dist: pandas>=2.1.1
|
23
|
-
Requires-Dist: tenacity==8.3.0
|
24
23
|
Provides-Extra: dev
|
25
24
|
Requires-Dist: pytest; extra == "dev"
|
26
25
|
Requires-Dist: pytest-cov; extra == "dev"
|
@@ -0,0 +1,23 @@
|
|
1
|
+
ragaai_catalyst/__init__.py,sha256=kxR70lWGd_b5q6wn7wg8h_Oth5EohSqzMPjWMe1Za50,334
|
2
|
+
ragaai_catalyst/_version.py,sha256=JKt9KaVNOMVeGs8ojO6LvIZr7ZkMzNN-gCcvryy4x8E,460
|
3
|
+
ragaai_catalyst/dataset.py,sha256=3f6wFQSZ2d9tB76nb4tWShhxsPLKk0HPZMFmS49zO6M,10802
|
4
|
+
ragaai_catalyst/evaluation.py,sha256=IL21tYox46Yb15Ix7PqGYF4T-I5UHWdDghcwY0qVYYM,15751
|
5
|
+
ragaai_catalyst/experiment.py,sha256=8KvqgJg5JVnt9ghhGDJvdb4mN7ETBX_E5gNxBT0Nsn8,19010
|
6
|
+
ragaai_catalyst/prompt_manager.py,sha256=ZMIHrmsnPMq20YfeNxWXLtrxnJyMcxpeJ8Uya7S5dUA,16411
|
7
|
+
ragaai_catalyst/ragaai_catalyst.py,sha256=5Q1VCE7P33DtjaOtVGRUgBL8dpDL9kjisWGIkOyX4nE,17426
|
8
|
+
ragaai_catalyst/utils.py,sha256=TlhEFwLyRU690HvANbyoRycR3nQ67lxVUQoUOfTPYQ0,3772
|
9
|
+
ragaai_catalyst/tracers/__init__.py,sha256=NppmJhD3sQ5R1q6teaZLS7rULj08Gb6JT8XiPRIe_B0,49
|
10
|
+
ragaai_catalyst/tracers/tracer.py,sha256=eaGJdLEIjadHpbWBXBl5AhMa2vL97SVjik4U1L8gros,9591
|
11
|
+
ragaai_catalyst/tracers/exporters/__init__.py,sha256=kVA8zp05h3phu4e-iHSlnznp_PzMRczB7LphSsZgUjg,138
|
12
|
+
ragaai_catalyst/tracers/exporters/file_span_exporter.py,sha256=eBy5OYl48tsl2KKiaPo8oY_L_myqBsyYuGWZgU-TjAQ,7218
|
13
|
+
ragaai_catalyst/tracers/exporters/raga_exporter.py,sha256=kfXuvQhu0dSKBUXsuJrhJANh3m-cPvqNyOshLEK7TNE,18192
|
14
|
+
ragaai_catalyst/tracers/instrumentators/__init__.py,sha256=FgnMQupoRTzmVsG9YKsLQera2Pfs-AluZv8CxwavoyQ,253
|
15
|
+
ragaai_catalyst/tracers/instrumentators/langchain.py,sha256=yMN0qVF0pUVk6R5M1vJoUXezDo1ejs4klCFRlE8x4vE,574
|
16
|
+
ragaai_catalyst/tracers/instrumentators/llamaindex.py,sha256=SMrRlR4xM7k9HK43hakE8rkrWHxMlmtmWD-AX6TeByc,416
|
17
|
+
ragaai_catalyst/tracers/instrumentators/openai.py,sha256=14R4KW9wQCR1xysLfsP_nxS7cqXrTPoD8En4MBAaZUU,379
|
18
|
+
ragaai_catalyst/tracers/utils/__init__.py,sha256=KeMaZtYaTojilpLv65qH08QmpYclfpacDA0U3wg6Ybw,64
|
19
|
+
ragaai_catalyst/tracers/utils/utils.py,sha256=ViygfJ7vZ7U0CTSA1lbxVloHp4NSlmfDzBRNCJuMhis,2374
|
20
|
+
ragaai_catalyst-2.0.dist-info/METADATA,sha256=BGjZfNQUDhUjZng1NP6Bycf4kqN4BhOcFUFZFOFV-Iw,6462
|
21
|
+
ragaai_catalyst-2.0.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
22
|
+
ragaai_catalyst-2.0.dist-info/top_level.txt,sha256=HpgsdRgEJMk8nqrU6qdCYk3di7MJkDL0B19lkc7dLfM,16
|
23
|
+
ragaai_catalyst-2.0.dist-info/RECORD,,
|
@@ -1,22 +0,0 @@
|
|
1
|
-
ragaai_catalyst/__init__.py,sha256=Y2YC0AKv5-nq4Le8OJf_pVyWic1e3mV-9N0dreodaLE,285
|
2
|
-
ragaai_catalyst/_version.py,sha256=JKt9KaVNOMVeGs8ojO6LvIZr7ZkMzNN-gCcvryy4x8E,460
|
3
|
-
ragaai_catalyst/dataset.py,sha256=xEun-MqTgT0JGyGB2t0BwwC6M7t1aUT7x5X12C-_4pI,7644
|
4
|
-
ragaai_catalyst/experiment.py,sha256=c0l72fNULb4KZVcXwehZKdXb116JRyd0Y3hU3CVf8Fs,18999
|
5
|
-
ragaai_catalyst/prompt_manager.py,sha256=3jEcgS0JRZzjHww_ityOkq9SMvi7DQ75PlKu-17dXW4,14729
|
6
|
-
ragaai_catalyst/ragaai_catalyst.py,sha256=FIyYriVe11GrHZ6CAErk76Hm38DTlUNSMLTEyS_yST8,16302
|
7
|
-
ragaai_catalyst/utils.py,sha256=TlhEFwLyRU690HvANbyoRycR3nQ67lxVUQoUOfTPYQ0,3772
|
8
|
-
ragaai_catalyst/tracers/__init__.py,sha256=NppmJhD3sQ5R1q6teaZLS7rULj08Gb6JT8XiPRIe_B0,49
|
9
|
-
ragaai_catalyst/tracers/tracer.py,sha256=LZQNKQF6hRfzxDu_Ljs2HBxQinjihKQoH189gIsO4w4,9171
|
10
|
-
ragaai_catalyst/tracers/exporters/__init__.py,sha256=kVA8zp05h3phu4e-iHSlnznp_PzMRczB7LphSsZgUjg,138
|
11
|
-
ragaai_catalyst/tracers/exporters/file_span_exporter.py,sha256=E1uSBZ8JfUBLLtkhN3lIy_AWmPcZDCInsOFhPoWP9mU,6362
|
12
|
-
ragaai_catalyst/tracers/exporters/raga_exporter.py,sha256=yxLadWzGCTr6AMh9n0U_1xNlw80aAcLE0KthktC2xMU,17487
|
13
|
-
ragaai_catalyst/tracers/instrumentators/__init__.py,sha256=FgnMQupoRTzmVsG9YKsLQera2Pfs-AluZv8CxwavoyQ,253
|
14
|
-
ragaai_catalyst/tracers/instrumentators/langchain.py,sha256=yMN0qVF0pUVk6R5M1vJoUXezDo1ejs4klCFRlE8x4vE,574
|
15
|
-
ragaai_catalyst/tracers/instrumentators/llamaindex.py,sha256=SMrRlR4xM7k9HK43hakE8rkrWHxMlmtmWD-AX6TeByc,416
|
16
|
-
ragaai_catalyst/tracers/instrumentators/openai.py,sha256=14R4KW9wQCR1xysLfsP_nxS7cqXrTPoD8En4MBAaZUU,379
|
17
|
-
ragaai_catalyst/tracers/utils/__init__.py,sha256=KeMaZtYaTojilpLv65qH08QmpYclfpacDA0U3wg6Ybw,64
|
18
|
-
ragaai_catalyst/tracers/utils/utils.py,sha256=ViygfJ7vZ7U0CTSA1lbxVloHp4NSlmfDzBRNCJuMhis,2374
|
19
|
-
ragaai_catalyst-1.0.8.1.dist-info/METADATA,sha256=9cvmDF2LmHG_U6NI1LrkKZYroqakYGpD7TIWjTdDoUM,6499
|
20
|
-
ragaai_catalyst-1.0.8.1.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
21
|
-
ragaai_catalyst-1.0.8.1.dist-info/top_level.txt,sha256=HpgsdRgEJMk8nqrU6qdCYk3di7MJkDL0B19lkc7dLfM,16
|
22
|
-
ragaai_catalyst-1.0.8.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|