ragaai-catalyst 1.0.7b3__tar.gz → 1.0.7b4__tar.gz

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.
Files changed (30) hide show
  1. ragaai_catalyst-1.0.7b4/.gitignore +167 -0
  2. {ragaai_catalyst-1.0.7b3/ragaai_catalyst.egg-info → ragaai_catalyst-1.0.7b4}/PKG-INFO +1 -1
  3. {ragaai_catalyst-1.0.7b3 → ragaai_catalyst-1.0.7b4}/pyproject.toml +1 -1
  4. {ragaai_catalyst-1.0.7b3 → ragaai_catalyst-1.0.7b4}/ragaai_catalyst/experiment.py +44 -4
  5. {ragaai_catalyst-1.0.7b3 → ragaai_catalyst-1.0.7b4/ragaai_catalyst.egg-info}/PKG-INFO +1 -1
  6. ragaai_catalyst-1.0.7b3/.gitignore +0 -4
  7. {ragaai_catalyst-1.0.7b3 → ragaai_catalyst-1.0.7b4}/README.md +0 -0
  8. {ragaai_catalyst-1.0.7b3 → ragaai_catalyst-1.0.7b4}/__init__.py +0 -0
  9. {ragaai_catalyst-1.0.7b3 → ragaai_catalyst-1.0.7b4}/ragaai_catalyst/__init__.py +0 -0
  10. {ragaai_catalyst-1.0.7b3 → ragaai_catalyst-1.0.7b4}/ragaai_catalyst/_version.py +0 -0
  11. {ragaai_catalyst-1.0.7b3 → ragaai_catalyst-1.0.7b4}/ragaai_catalyst/dataset.py +0 -0
  12. {ragaai_catalyst-1.0.7b3 → ragaai_catalyst-1.0.7b4}/ragaai_catalyst/ragaai_catalyst.py +0 -0
  13. {ragaai_catalyst-1.0.7b3 → ragaai_catalyst-1.0.7b4}/ragaai_catalyst/tracers/__init__.py +0 -0
  14. {ragaai_catalyst-1.0.7b3 → ragaai_catalyst-1.0.7b4}/ragaai_catalyst/tracers/exporters/__init__.py +0 -0
  15. {ragaai_catalyst-1.0.7b3 → ragaai_catalyst-1.0.7b4}/ragaai_catalyst/tracers/exporters/file_span_exporter.py +0 -0
  16. {ragaai_catalyst-1.0.7b3 → ragaai_catalyst-1.0.7b4}/ragaai_catalyst/tracers/exporters/raga_exporter.py +0 -0
  17. {ragaai_catalyst-1.0.7b3 → ragaai_catalyst-1.0.7b4}/ragaai_catalyst/tracers/instrumentators/__init__.py +0 -0
  18. {ragaai_catalyst-1.0.7b3 → ragaai_catalyst-1.0.7b4}/ragaai_catalyst/tracers/instrumentators/langchain.py +0 -0
  19. {ragaai_catalyst-1.0.7b3 → ragaai_catalyst-1.0.7b4}/ragaai_catalyst/tracers/instrumentators/llamaindex.py +0 -0
  20. {ragaai_catalyst-1.0.7b3 → ragaai_catalyst-1.0.7b4}/ragaai_catalyst/tracers/instrumentators/openai.py +0 -0
  21. {ragaai_catalyst-1.0.7b3 → ragaai_catalyst-1.0.7b4}/ragaai_catalyst/tracers/tracer.py +0 -0
  22. {ragaai_catalyst-1.0.7b3 → ragaai_catalyst-1.0.7b4}/ragaai_catalyst/tracers/utils/__init__.py +0 -0
  23. {ragaai_catalyst-1.0.7b3 → ragaai_catalyst-1.0.7b4}/ragaai_catalyst/tracers/utils/utils.py +0 -0
  24. {ragaai_catalyst-1.0.7b3 → ragaai_catalyst-1.0.7b4}/ragaai_catalyst/utils.py +0 -0
  25. {ragaai_catalyst-1.0.7b3 → ragaai_catalyst-1.0.7b4}/ragaai_catalyst.egg-info/SOURCES.txt +0 -0
  26. {ragaai_catalyst-1.0.7b3 → ragaai_catalyst-1.0.7b4}/ragaai_catalyst.egg-info/dependency_links.txt +0 -0
  27. {ragaai_catalyst-1.0.7b3 → ragaai_catalyst-1.0.7b4}/ragaai_catalyst.egg-info/requires.txt +0 -0
  28. {ragaai_catalyst-1.0.7b3 → ragaai_catalyst-1.0.7b4}/ragaai_catalyst.egg-info/top_level.txt +0 -0
  29. {ragaai_catalyst-1.0.7b3 → ragaai_catalyst-1.0.7b4}/requirements.txt +0 -0
  30. {ragaai_catalyst-1.0.7b3 → ragaai_catalyst-1.0.7b4}/setup.cfg +0 -0
@@ -0,0 +1,167 @@
1
+ .idea/
2
+ dist/
3
+ test_files
4
+ ragaai_catalyst.egg-info/
5
+ .DS_Store
6
+ test_files/
7
+ __pycache__/
8
+
9
+ # Byte-compiled / optimized / DLL files
10
+ __pycache__/
11
+ *.py[cod]
12
+ *$py.class
13
+
14
+ # C extensions
15
+ *.so
16
+
17
+ # Distribution / packaging
18
+ .Python
19
+ build/
20
+ develop-eggs/
21
+ downloads/
22
+ eggs/
23
+ .eggs/
24
+ lib/
25
+ lib64/
26
+ parts/
27
+ sdist/
28
+ var/
29
+ wheels/
30
+ share/python-wheels/
31
+ *.egg-info/
32
+ .installed.cfg
33
+ *.egg
34
+ MANIFEST
35
+
36
+ # PyInstaller
37
+ # Usually these files are written by a python script from a template
38
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
39
+ *.manifest
40
+ *.spec
41
+
42
+ # Installer logs
43
+ pip-log.txt
44
+ pip-delete-this-directory.txt
45
+
46
+ # Unit test / coverage reports
47
+ htmlcov/
48
+ .tox/
49
+ .nox/
50
+ .coverage
51
+ .coverage.*
52
+ .cache
53
+ nosetests.xml
54
+ coverage.xml
55
+ *.cover
56
+ *.py,cover
57
+ .hypothesis/
58
+ .pytest_cache/
59
+ cover/
60
+
61
+ # Translations
62
+ *.mo
63
+ *.pot
64
+
65
+ # Django stuff:
66
+ *.log
67
+ local_settings.py
68
+ db.sqlite3
69
+ db.sqlite3-journal
70
+
71
+ # Flask stuff:
72
+ instance/
73
+ .webassets-cache
74
+
75
+ # Scrapy stuff:
76
+ .scrapy
77
+
78
+ # Sphinx documentation
79
+ docs/_build/
80
+
81
+ # PyBuilder
82
+ .pybuilder/
83
+ target/
84
+
85
+ # Jupyter Notebook
86
+ .ipynb_checkpoints
87
+
88
+ # IPython
89
+ profile_default/
90
+ ipython_config.py
91
+
92
+ # pyenv
93
+ # For a library or package, you might want to ignore these files since the code is
94
+ # intended to run in multiple environments; otherwise, check them in:
95
+ .python-version
96
+
97
+ # pipenv
98
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
99
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
100
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
101
+ # install all needed dependencies.
102
+ #Pipfile.lock
103
+
104
+ # poetry
105
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
106
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
107
+ # commonly ignored for libraries.
108
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
109
+ #poetry.lock
110
+
111
+ # pdm
112
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113
+ #pdm.lock
114
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
115
+ # in version control.
116
+ # https://pdm.fming.dev/#use-with-ide
117
+ .pdm.toml
118
+
119
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
120
+ __pypackages__/
121
+
122
+ # Celery stuff
123
+ celerybeat-schedule
124
+ celerybeat.pid
125
+
126
+ # SageMath parsed files
127
+ *.sage.py
128
+
129
+ # Environments
130
+ .env
131
+ .venv
132
+ env/
133
+ venv/
134
+ ENV/
135
+ env.bak/
136
+ venv.bak/
137
+
138
+ # Spyder project settings
139
+ .spyderproject
140
+ .spyproject
141
+
142
+ # Rope project settings
143
+ .ropeproject
144
+
145
+ # mkdocs documentation
146
+ /site
147
+
148
+ # mypy
149
+ .mypy_cache/
150
+ .dmypy.json
151
+ dmypy.json
152
+
153
+ # Pyre type checker
154
+ .pyre/
155
+
156
+ # pytype static type analyzer
157
+ .pytype/
158
+
159
+ # Cython debug symbols
160
+ cython_debug/
161
+
162
+ # PyCharm
163
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
164
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
165
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
166
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
167
+ #.idea/
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ragaai_catalyst
3
- Version: 1.0.7b3
3
+ Version: 1.0.7b4
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>
6
6
  Requires-Python: >=3.9
@@ -8,7 +8,7 @@ description = "RAGA AI CATALYST"
8
8
  readme = "README.md"
9
9
  requires-python = ">=3.9"
10
10
  # license = {file = "LICENSE"}
11
- version = "1.0.7.beta.3"
11
+ version = "1.0.7.beta.4"
12
12
  authors = [
13
13
  {name = "Kiran Scaria", email = "kiran.scaria@raga.ai"},
14
14
  {name = "Kedar Gaikwad", email = "kedar.gaikwad@raga.ai"},
@@ -339,11 +339,51 @@ class Experiment:
339
339
  Parse the response to get the results
340
340
  """
341
341
  try:
342
- parsed_response_df = pd.DataFrame(response["data"]["docs"])
343
- return True, parsed_response_df
342
+ x = pd.DataFrame(response["data"]["docs"])
343
+
344
+ column_names_to_replace = [
345
+ {item["columnName"]: item["displayName"]}
346
+ for item in response["data"]["columns"]
347
+ ]
348
+
349
+ if column_names_to_replace:
350
+ for item in column_names_to_replace:
351
+ x = x.rename(columns=item)
352
+
353
+ dict_cols = [
354
+ col
355
+ for col in x.columns
356
+ if x[col].dtype == "object"
357
+ and x[col].apply(lambda y: isinstance(y, dict)).any()
358
+ ]
359
+
360
+ for dict_col in dict_cols:
361
+ x[f"{dict_col}_reason"] = x[dict_col].apply(
362
+ lambda y: y.get("reason") if isinstance(y, dict) else None
363
+ )
364
+ x[f"{dict_col}_metric_config"] = x[dict_col].apply(
365
+ lambda y: (
366
+ y.get("metric_config") if isinstance(y, dict) else None
367
+ )
368
+ )
369
+ x[f"{dict_col}_passed"] = x[dict_col].apply(
370
+ lambda y: y.get("passed") if isinstance(y, dict) else None
371
+ )
372
+ x[f"{dict_col}_status"] = x[dict_col].apply(
373
+ lambda y: y.get("status") if isinstance(y, dict) else None
374
+ )
375
+
376
+ x = x.drop(columns=[dict_col])
377
+
378
+ x.columns = x.columns.str.replace("_reason_reason", "_reason")
379
+ x.columns = x.columns.str.replace("_reason_metric_config", "_metric_config")
380
+ x.columns = x.columns.str.replace("_reason_passed", "_passed")
381
+ x.columns = x.columns.str.replace("_reason_status", "_status")
382
+ return True, x
383
+
344
384
  except Exception as e:
345
- logger.error(f"Failed to parse response: {e}")
346
- return False, ""
385
+ logger.error(f"Failed to parse response: {e}", exc_info=True)
386
+ return False, pd.DataFrame()
347
387
 
348
388
 
349
389
  class FailedToRetrieveResults(Exception):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ragaai_catalyst
3
- Version: 1.0.7b3
3
+ Version: 1.0.7b4
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>
6
6
  Requires-Python: >=3.9
@@ -1,4 +0,0 @@
1
- .idea/
2
- dist/
3
- test_files
4
- ragaai_catalyst.egg-info/