ragaai-catalyst 2.2.4b4__tar.gz → 2.2.4.1b1__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 (221) hide show
  1. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/.gitignore +42 -21
  2. {ragaai_catalyst-2.2.4b4/ragaai_catalyst.egg-info → ragaai_catalyst-2.2.4.1b1}/PKG-INFO +1 -1
  3. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/Quickstart.md +13 -8
  4. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/pyproject.toml +1 -1
  5. ragaai_catalyst-2.2.4.1b1/ragaai_catalyst/tracers/agentic_tracing/upload/session_manager.py +92 -0
  6. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/upload/trace_uploader.py +122 -34
  7. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/upload/upload_agentic_traces.py +45 -32
  8. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/upload/upload_code.py +79 -42
  9. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/exporters/ragaai_trace_exporter.py +1 -0
  10. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/utils/trace_json_converter.py +2 -2
  11. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1/ragaai_catalyst.egg-info}/PKG-INFO +1 -1
  12. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst.egg-info/SOURCES.txt +1 -0
  13. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  14. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  15. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  16. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/.github/workflows/ci.yml +0 -0
  17. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/.gitmodules +0 -0
  18. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/LICENSE +0 -0
  19. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/README.md +0 -0
  20. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/docs/agentic_tracing.md +0 -0
  21. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/docs/dataset_management.md +0 -0
  22. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/docs/img/autheticate.gif +0 -0
  23. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/docs/img/create_project.gif +0 -0
  24. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/docs/img/custom_metrics.png +0 -0
  25. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/docs/img/dataset.gif +0 -0
  26. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/docs/img/dataset.png +0 -0
  27. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/docs/img/evaluation.gif +0 -0
  28. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/docs/img/evaluation.png +0 -0
  29. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/docs/img/guardrails.png +0 -0
  30. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/docs/img/last_main.png +0 -0
  31. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/docs/img/main.png +0 -0
  32. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/docs/img/projects_new.png +0 -0
  33. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/docs/img/trace_comp.png +0 -0
  34. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/docs/prompt_management.md +0 -0
  35. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/docs/trace_management.md +0 -0
  36. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/all_llm_provider/all_llm_provider.py +0 -0
  37. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/all_llm_provider/config.py +0 -0
  38. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/all_llm_provider/run_all_llm_provider.py +0 -0
  39. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/crewai/scifi_writer/README.md +0 -0
  40. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/crewai/scifi_writer/requirements.txt +0 -0
  41. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/crewai/scifi_writer/sample.env +0 -0
  42. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/crewai/scifi_writer/scifi_writer.py +0 -0
  43. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/custom_agents/travel_agent/agents.py +0 -0
  44. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/custom_agents/travel_agent/config.py +0 -0
  45. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/custom_agents/travel_agent/main.py +0 -0
  46. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/custom_agents/travel_agent/tools.py +0 -0
  47. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/haystack/news_fetching/README.md +0 -0
  48. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/haystack/news_fetching/news_fetching.py +0 -0
  49. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/haystack/news_fetching/requirements.txt +0 -0
  50. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/langchain/medical_rag/data/medical_texts/handbook1.pdf +0 -0
  51. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/langchain/medical_rag/data/medical_texts/handbook2.pdf +0 -0
  52. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/langchain/medical_rag/data/symptom_disease_map.csv +0 -0
  53. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/langchain/medical_rag/diagnosis_agent.py +0 -0
  54. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/langchain/medical_rag/requirements.txt +0 -0
  55. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/langchain/medical_rag/sample.env +0 -0
  56. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/langgraph/personal_research_assistant/README.md +0 -0
  57. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/langgraph/personal_research_assistant/requirements.txt +0 -0
  58. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/langgraph/personal_research_assistant/research_assistant.py +0 -0
  59. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/langgraph/personal_research_assistant/sample.env +0 -0
  60. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/llamaindex_examples/legal_research_rag/legal_data/cases/ca_overtime_2021.pdf +0 -0
  61. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/llamaindex_examples/legal_research_rag/legal_data/cases/fl_ada_2022.pdf +0 -0
  62. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/llamaindex_examples/legal_research_rag/legal_data/statutes.csv +0 -0
  63. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/llamaindex_examples/legal_research_rag/legal_rag.py +0 -0
  64. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/llamaindex_examples/legal_research_rag/requirements.txt +0 -0
  65. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/llamaindex_examples/legal_research_rag/sample.env +0 -0
  66. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/openai_agents_sdk/email_data_extraction_agent/README.md +0 -0
  67. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/openai_agents_sdk/email_data_extraction_agent/data_extraction_email.py +0 -0
  68. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/openai_agents_sdk/email_data_extraction_agent/requirements.txt +0 -0
  69. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/openai_agents_sdk/email_data_extraction_agent/sample.env +0 -0
  70. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/openai_agents_sdk/youtube_summary_agent/README.md +0 -0
  71. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/openai_agents_sdk/youtube_summary_agent/requirements.txt +0 -0
  72. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/openai_agents_sdk/youtube_summary_agent/sample.env +0 -0
  73. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/openai_agents_sdk/youtube_summary_agent/youtube_summary_agent.py +0 -0
  74. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/pii_masking_example/llamaindex_agentic_fastapi/app.py +0 -0
  75. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/pii_masking_example/llamaindex_agentic_fastapi/app_presidio.py +0 -0
  76. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/pii_masking_example/llamaindex_agentic_fastapi/request.py +0 -0
  77. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/pii_masking_example/llamaindex_agentic_fastapi/requirements.txt +0 -0
  78. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/smolagents/most_upvoted_paper/README.md +0 -0
  79. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/smolagents/most_upvoted_paper/most_upvoted_paper.py +0 -0
  80. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/smolagents/most_upvoted_paper/requirements.txt +0 -0
  81. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/examples/smolagents/most_upvoted_paper/sample.env +0 -0
  82. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/__init__.py +0 -0
  83. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/_version.py +0 -0
  84. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/dataset.py +0 -0
  85. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/evaluation.py +0 -0
  86. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/experiment.py +0 -0
  87. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/guard_executor.py +0 -0
  88. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/guardrails_manager.py +0 -0
  89. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/internal_api_completion.py +0 -0
  90. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/prompt_manager.py +0 -0
  91. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/proxy_call.py +0 -0
  92. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/ragaai_catalyst.py +0 -0
  93. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/redteaming/__init__.py +0 -0
  94. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/redteaming/config/detectors.toml +0 -0
  95. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/redteaming/data_generator/scenario_generator.py +0 -0
  96. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/redteaming/data_generator/test_case_generator.py +0 -0
  97. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/redteaming/evaluator.py +0 -0
  98. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/redteaming/llm_generator.py +0 -0
  99. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/redteaming/llm_generator_old.py +0 -0
  100. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/redteaming/red_teaming.py +0 -0
  101. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/redteaming/requirements.txt +0 -0
  102. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/redteaming/tests/grok.ipynb +0 -0
  103. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/redteaming/tests/stereotype.ipynb +0 -0
  104. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/redteaming/upload_result.py +0 -0
  105. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/redteaming/utils/issue_description.py +0 -0
  106. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/redteaming/utils/rt.png +0 -0
  107. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/redteaming_old.py +0 -0
  108. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/synthetic_data_generation.py +0 -0
  109. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/__init__.py +0 -0
  110. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/README.md +0 -0
  111. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/__init__.py +0 -0
  112. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/data/__init__.py +0 -0
  113. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/data/data_structure.py +0 -0
  114. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/tests/FinancialAnalysisSystem.ipynb +0 -0
  115. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/tests/GameActivityEventPlanner.ipynb +0 -0
  116. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/tests/TravelPlanner.ipynb +0 -0
  117. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/tests/__init__.py +0 -0
  118. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/tests/ai_travel_agent.py +0 -0
  119. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/tests/unique_decorator_test.py +0 -0
  120. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/tracers/__init__.py +0 -0
  121. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/tracers/agent_tracer.py +0 -0
  122. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/tracers/base.py +0 -0
  123. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/tracers/custom_tracer.py +0 -0
  124. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/tracers/langgraph_tracer.py +0 -0
  125. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/tracers/llm_tracer.py +0 -0
  126. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/tracers/main_tracer.py +0 -0
  127. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/tracers/network_tracer.py +0 -0
  128. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/tracers/tool_tracer.py +0 -0
  129. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/tracers/user_interaction_tracer.py +0 -0
  130. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/upload/__init__.py +0 -0
  131. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/upload/upload_local_metric.py +0 -0
  132. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/utils/__init__.py +0 -0
  133. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/utils/api_utils.py +0 -0
  134. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/utils/create_dataset_schema.py +0 -0
  135. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/utils/file_name_tracker.py +0 -0
  136. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/utils/generic.py +0 -0
  137. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/utils/get_user_trace_metrics.py +0 -0
  138. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/utils/llm_utils.py +0 -0
  139. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/utils/model_costs.json +0 -0
  140. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/utils/span_attributes.py +0 -0
  141. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/utils/supported_llm_provider.toml +0 -0
  142. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/utils/system_monitor.py +0 -0
  143. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/utils/trace_utils.py +0 -0
  144. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/utils/unique_decorator.py +0 -0
  145. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/agentic_tracing/utils/zip_list_of_unique_files.py +0 -0
  146. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/distributed.py +0 -0
  147. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/exporters/__init__.py +0 -0
  148. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/exporters/dynamic_trace_exporter.py +0 -0
  149. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/exporters/file_span_exporter.py +0 -0
  150. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/exporters/raga_exporter.py +0 -0
  151. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/instrumentators/__init__.py +0 -0
  152. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/langchain_callback.py +0 -0
  153. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/llamaindex_callback.py +0 -0
  154. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/llamaindex_instrumentation.py +0 -0
  155. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/tracer.py +0 -0
  156. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/upload_traces.py +0 -0
  157. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/utils/__init__.py +0 -0
  158. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/utils/convert_langchain_callbacks_output.py +0 -0
  159. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/utils/convert_llama_instru_callback.py +0 -0
  160. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/utils/extraction_logic_llama_index.py +0 -0
  161. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/utils/langchain_tracer_extraction_logic.py +0 -0
  162. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/utils/model_prices_and_context_window_backup.json +0 -0
  163. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/utils/rag_extraction_logic_final.py +0 -0
  164. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/utils/rag_trace_json_converter.py +0 -0
  165. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/tracers/utils/utils.py +0 -0
  166. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst/utils.py +0 -0
  167. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst.egg-info/dependency_links.txt +0 -0
  168. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst.egg-info/requires.txt +0 -0
  169. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/ragaai_catalyst.egg-info/top_level.txt +0 -0
  170. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/requirements.txt +0 -0
  171. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/setup.cfg +0 -0
  172. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/test_report_20250407_183101.txt +0 -0
  173. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/README.md +0 -0
  174. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/environment.yml +0 -0
  175. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/examples/__init__.py +0 -0
  176. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/examples/all_llm_provider/all_llm_provider.py +0 -0
  177. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/examples/all_llm_provider/config.py +0 -0
  178. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/examples/all_llm_provider/test_all_llm_provider.py +0 -0
  179. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/examples/crewai/scifi_writer/sci_fi_story.md +0 -0
  180. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/examples/crewai/scifi_writer/scifi_writer.py +0 -0
  181. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/examples/crewai/scifi_writer/test_scifi_writer.py +0 -0
  182. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/examples/custom_agents/travel_agent/agents.py +0 -0
  183. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/examples/custom_agents/travel_agent/config.py +0 -0
  184. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/examples/custom_agents/travel_agent/main.py +0 -0
  185. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/examples/custom_agents/travel_agent/test_travel_agent.py +0 -0
  186. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/examples/custom_agents/travel_agent/tools.py +0 -0
  187. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/examples/haystack/news_fetching/news_fetching.py +0 -0
  188. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/examples/haystack/news_fetching/test_news_fetching.py +0 -0
  189. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/examples/langchain/medical_rag/data/medical_texts/handbook1.pdf +0 -0
  190. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/examples/langchain/medical_rag/data/medical_texts/handbook2.pdf +0 -0
  191. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/examples/langchain/medical_rag/data/symptom_disease_map.csv +0 -0
  192. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/examples/langchain/medical_rag/diagnosis_agent.py +0 -0
  193. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/examples/langchain/medical_rag/test_diagnosis_agent.py +0 -0
  194. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/examples/langgraph/personal_research_assistant/research_assistant.py +0 -0
  195. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/examples/langgraph/personal_research_assistant/test_research_assistant.py +0 -0
  196. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/examples/llamaindex_examples/legal_research_rag/legal_data/cases/ca_overtime_2021.pdf +0 -0
  197. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/examples/llamaindex_examples/legal_research_rag/legal_data/cases/fl_ada_2022.pdf +0 -0
  198. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/examples/llamaindex_examples/legal_research_rag/legal_data/statutes.csv +0 -0
  199. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/examples/llamaindex_examples/legal_research_rag/legal_rag.py +0 -0
  200. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/examples/llamaindex_examples/legal_research_rag/test_legal_rag.py +0 -0
  201. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/examples/smolagents/most_upvoted_paper/most_upvoted_paper.py +0 -0
  202. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/examples/smolagents/most_upvoted_paper/paper.pdf +0 -0
  203. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/examples/smolagents/most_upvoted_paper/test_most_upvoted_paper.py +0 -0
  204. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/examples/test_utils/get_components.py +0 -0
  205. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/examples/test_utils/get_trace_data.py +0 -0
  206. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/run_pytest_and_print_and_save_results.py +0 -0
  207. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/table_result.png +0 -0
  208. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/test_catalyst/test_base_tracer_add_metrics.py +0 -0
  209. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/test_catalyst/test_base_tracer_metrics.py +0 -0
  210. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/test_catalyst/test_data/util_synthetic_data_doc.pdf +0 -0
  211. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/test_catalyst/test_data/util_synthetic_data_invalid.csv +0 -0
  212. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/test_catalyst/test_data/util_synthetic_data_valid.csv +0 -0
  213. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/test_catalyst/test_data/util_test_dataset.csv +0 -0
  214. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/test_catalyst/test_data/util_test_langchain_tracing.pdf +0 -0
  215. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/test_catalyst/test_dataset.py +0 -0
  216. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/test_catalyst/test_evaluation.py +0 -0
  217. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/test_catalyst/test_evaluation_metrics.py +0 -0
  218. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/test_catalyst/test_prompt_manager.py +0 -0
  219. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/test_catalyst/test_synthetic_data_generation.py +0 -0
  220. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests/test_catalyst/test_the_configuration.py +0 -0
  221. {ragaai_catalyst-2.2.4b4 → ragaai_catalyst-2.2.4.1b1}/tests_requirements.txt +0 -0
@@ -168,7 +168,9 @@ cython_debug/
168
168
  # option (not recommended) you can uncomment the following to ignore the entire idea folder.
169
169
  #.idea/
170
170
 
171
-
171
+ LOAD_TEST_README.md
172
+ RAG_LOAD_TEST_README.md
173
+ advanced_agent.py
172
174
  agent_load_test_exceptions.csv
173
175
  agent_load_test_failures.csv
174
176
  agent_load_test_stats.csv
@@ -179,43 +181,62 @@ chroma_db/
179
181
  custom_cost_bug.ipynb
180
182
  custom_cost_bug.py
181
183
  data/
182
- data_structure.py
183
184
  deephealth_sample_50_data.csv
184
185
  dh_full_test.ipynb
186
+ dh_full_test.py
185
187
  diagnosis_agent.py
188
+ direct_anthropic.json
189
+ direct_llm_call_test.py
190
+ direct_llm_examples.py
191
+ direct_opanai.json
192
+ docker_gt_dataset1.csv
193
+ ex_google_adk.py
194
+ fastapi_requirements.txt
195
+ fastapi_server.py
196
+ google_adk_agent_ex.py
197
+ google_adk_storyflow_agent.py
198
+ langchain_rag.py
186
199
  langchain_sample_trace.json
187
200
  legal_rag.py
201
+ llamaindex_rag.py
188
202
  load_test_streaming.py
189
203
  load_test_v1.py
190
204
  load_test_v2.py
191
- # locustfile.py
205
+ locust_mini_endpoint.py
206
+ locust_nano_endpoint.py
207
+ locustfile.py
208
+ locustfile_fixed.py
209
+ locustfile_rag.py
192
210
  masking_example.py
211
+ minio-file.json
212
+ model_gemini_15_flash_002_w_stream.json
213
+ model_gemini_15_flash_002_wo_stream.json
214
+ model_gpt_41_w_stream.json
215
+ model_gpt_41_wo_stream.json
216
+ model_gpt_4o_mini_w_stream.json
217
+ model_gpt_4o_mini_wo_stream.json
193
218
  model_prices_and_context_window_backup.json
194
- # multi_llm_test.py
219
+ multi_llm_test.py
220
+ multi_tool_agent/
221
+ multi_tracer_test.py
222
+ new_feature_test.ipynb
223
+ pydantic_test.ipynb
195
224
  rag_agent_traces.json
225
+ rag_agent_traces_adk_agent.json
196
226
  rag_agent_traces_with_streaming.json
197
227
  rag_agent_traces_wo_streaming.json
198
228
  rag_extraction_logic_final.py
199
229
  research_assistant.py
230
+ run_rag_load_test.py
200
231
  sci_fi_story.md
201
232
  scifi_writer.py
233
+ set_dataset_name_test.py
234
+ simple_rag_app.py
202
235
  stress_test_langchain.py
203
236
  test.ipynb
237
+ test_2.py
238
+ test_fastapi.py
204
239
  test_token_refresh.py
205
- uplaod_numerical_col_csv.py
206
- dh_full_test.py
207
- model_gemini_15_flash_002_w_stream.json
208
- model_gemini_15_flash_002_wo_stream.json
209
- model_gpt_4o_mini_w_stream.json
210
- model_gpt_4o_mini_wo_stream.json
211
- model_gpt_41_w_stream.json
212
- model_gpt_41_wo_stream.json
213
- RAG_LOAD_TEST_README.md
214
- locustfile.py
215
- locustfile_fixed.py
216
- locustfile_rag.py
217
- multi_llm_test.py
218
- run_rag_load_test.py
219
- set_dataset_name_test.py
220
- simple_rag_app.py
221
- trace_upload_analysis.md
240
+ trace_upload_analysis.md
241
+ updated_pydantic_test.py
242
+ uplaod_numerical_col_csv.py
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ragaai_catalyst
3
- Version: 2.2.4b4
3
+ Version: 2.2.4.1b1
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>, Rishabh Pandey <rishabh.pandey@raga.ai>, Jyotsana C G <jyotsana@raga.ai>
6
6
  Requires-Python: <=3.13.2,>=3.10
@@ -1,4 +1,4 @@
1
- # Quickstart
1
+ # Quickstart | RagaAI Catalyst
2
2
 
3
3
  ## **1. Install RagaAI Catalyst**
4
4
 
@@ -17,8 +17,6 @@ pip install ragaai-catalyst
17
17
  2. Navigate to **Profile Settings** → **Authentication**.
18
18
  3. Click **Generate New Key** to obtain your **Access Key** and **Secret Key**.
19
19
 
20
- ![How to generate authentication keys](docs/img/autheticate.gif)
21
-
22
20
  ### **Initialize the SDK**
23
21
 
24
22
  To begin using Catalyst, initialize it as follows:
@@ -33,6 +31,7 @@ catalyst = RagaAICatalyst(
33
31
  )
34
32
  ```
35
33
 
34
+
36
35
  ## **3. Create Your First Project**
37
36
 
38
37
  Create a new project and choose a use case from the available options:
@@ -47,8 +46,6 @@ project = catalyst.create_project(
47
46
  # List available use cases
48
47
  print(catalyst.project_use_cases())
49
48
  ```
50
- ![Projects](docs/img/create_project.gif)
51
-
52
49
 
53
50
  ### **Add a Dataset**
54
51
  Initialize the dataset manager and create a dataset from a CSV file, DataFrame, or JSONl file.
@@ -74,7 +71,7 @@ dataset_manager.create_from_csv(
74
71
  # View dataset schema
75
72
  print(dataset_manager.get_schema_mapping())
76
73
  ```
77
- ![Dataset](docs/img/dataset.gif)
74
+
78
75
 
79
76
  ## **4. Trace Your Application**
80
77
 
@@ -147,7 +144,7 @@ tracer.stop()
147
144
  # Verify data capture
148
145
  print(tracer.get_upload_status())
149
146
  ```
150
- ![Tracing](docs/img/last_main.png)
147
+
151
148
 
152
149
 
153
150
  ## **5. Evaluation Framework**
@@ -192,4 +189,12 @@ evaluation.add_metrics(
192
189
  print(f"Status: {evaluation.get_status()}")
193
190
  print(f"Results: {evaluation.get_results()}")
194
191
  ```
195
- ![Evaluation](docs/img/evaluation.gif)
192
+
193
+
194
+
195
+ ## **Next Steps**
196
+ - **Explore the Dashboard:** Visualize metrics and insights in the RagaAI Web UI.
197
+
198
+
199
+
200
+ **Version:** 1.0.0 | **Last Updated:** Mar 2025
@@ -8,7 +8,7 @@ description = "RAGA AI CATALYST"
8
8
  readme = "README.md"
9
9
  requires-python = ">=3.10,<=3.13.2"
10
10
  # license = {file = "LICENSE"}
11
- version = "2.2.4.beta.4"
11
+ version = "2.2.4.1.beta.1"
12
12
  authors = [
13
13
  {name = "Kiran Scaria", email = "kiran.scaria@raga.ai"},
14
14
  {name = "Kedar Gaikwad", email = "kedar.gaikwad@raga.ai"},
@@ -0,0 +1,92 @@
1
+ import logging
2
+ import threading
3
+
4
+ from requests.adapters import HTTPAdapter
5
+ from urllib3.util.retry import Retry
6
+ from urllib3.exceptions import PoolError, MaxRetryError, NewConnectionError
7
+ from requests.exceptions import ConnectionError, Timeout, RequestException
8
+ import requests
9
+
10
+ logger = logging.getLogger(__name__)
11
+
12
+
13
+ class SessionManager:
14
+ """Shared session manager with connection pooling for HTTP requests"""
15
+ _instance = None
16
+ _session = None
17
+ _lock = threading.Lock()
18
+
19
+ def __new__(cls):
20
+ if cls._instance is None:
21
+ with cls._lock: # Thread-safe singleton
22
+ if cls._instance is None: # Double-check locking
23
+ logger.info("Creating new SessionManager singleton instance")
24
+ cls._instance = super(SessionManager, cls).__new__(cls)
25
+ cls._instance._initialize_session()
26
+ else:
27
+ logger.debug("SessionManager instance already exists, returning existing instance")
28
+ else:
29
+ logger.debug("SessionManager instance exists, returning existing instance")
30
+ return cls._instance
31
+
32
+ def _initialize_session(self):
33
+ """Initialize session with connection pooling and retry strategy"""
34
+ logger.info("Initializing HTTP session with connection pooling and retry strategy")
35
+ self._session = requests.Session()
36
+
37
+ retry_strategy = Retry(
38
+ total=3, # number of retries
39
+ backoff_factor=0.5, # wait 0.5, 1, 2... seconds between retries
40
+ status_forcelist=[500, 502, 503, 504] # HTTP status codes to retry on
41
+ )
42
+
43
+ adapter = HTTPAdapter(
44
+ max_retries=retry_strategy,
45
+ pool_connections=2, # number of connections to keep in the pool
46
+ pool_maxsize=50, # maximum number of connections in the pool
47
+ pool_block=True
48
+ )
49
+ logger.debug(f"Configured HTTP adapter: pool_connections={adapter.config.get('pool_connections', 1)}, "
50
+ f"pool_maxsize={adapter.config.get('pool_maxsize', 50)}, "
51
+ f"pool_block={adapter.config.get('pool_block', False)}")
52
+
53
+ self._session.mount("http://", adapter)
54
+ self._session.mount("https://", adapter)
55
+ logger.info("HTTP session initialized successfully with adapters mounted for http:// and https://")
56
+
57
+ @property
58
+ def session(self):
59
+ if self._session is None:
60
+ logger.warning("Session accessed but not initialized, reinitializing...")
61
+ self._initialize_session()
62
+ return self._session
63
+
64
+ def close(self):
65
+ """Close the session"""
66
+ if self._session:
67
+ logger.info("Closing HTTP session")
68
+ self._session.close()
69
+ self._session = None
70
+ logger.info("HTTP session closed successfully")
71
+ else:
72
+ logger.debug("Close called but session was already None")
73
+
74
+ def handle_request_exceptions(self, e, operation_name):
75
+ """Handle common request exceptions with appropriate logging"""
76
+ logger.error(f"Exception occurred during {operation_name}")
77
+ if isinstance(e, (PoolError, MaxRetryError)):
78
+ logger.error(f"Connection pool exhausted during {operation_name}: {e}")
79
+ elif isinstance(e, NewConnectionError):
80
+ logger.error(f"Failed to establish new connection during {operation_name}: {e}")
81
+ elif isinstance(e, ConnectionError):
82
+ logger.error(f"Connection error during {operation_name}: {e}")
83
+ elif isinstance(e, Timeout):
84
+ logger.error(f"Request timeout during {operation_name}: {e}")
85
+ else:
86
+ logger.error(f"Unexpected error during {operation_name}: {e}")
87
+
88
+
89
+ # Global session manager instance
90
+ logger.info("Creating global SessionManager instance")
91
+ session_manager = SessionManager()
92
+ logger.info(f"Global SessionManager instance created with ID: {id(session_manager)}")
@@ -22,6 +22,7 @@ from typing import Dict, Any, Optional
22
22
  import threading
23
23
  import uuid
24
24
 
25
+
25
26
  # Set up logging
26
27
  log_dir = os.path.join(tempfile.gettempdir(), "ragaai_logs")
27
28
  os.makedirs(log_dir, exist_ok=True)
@@ -49,11 +50,13 @@ try:
49
50
  from ragaai_catalyst.tracers.agentic_tracing.upload.upload_code import upload_code
50
51
  # from ragaai_catalyst.tracers.agentic_tracing.upload.upload_trace_metric import upload_trace_metric
51
52
  from ragaai_catalyst.tracers.agentic_tracing.utils.create_dataset_schema import create_dataset_schema_with_trace
53
+ from ragaai_catalyst.tracers.agentic_tracing.upload.session_manager import session_manager
52
54
  from ragaai_catalyst import RagaAICatalyst
53
55
  IMPORTS_AVAILABLE = True
54
56
  except ImportError:
55
57
  logger.warning("RagaAI Catalyst imports not available - running in test mode")
56
58
  IMPORTS_AVAILABLE = False
59
+ session_manager = None
57
60
 
58
61
  # Define task queue directory
59
62
  QUEUE_DIR = os.path.join(tempfile.gettempdir(), "ragaai_tasks")
@@ -72,6 +75,10 @@ _executor_lock = threading.Lock()
72
75
  _futures: Dict[str, Any] = {}
73
76
  _futures_lock = threading.Lock()
74
77
 
78
+ # Dataset creation cache to avoid redundant API calls
79
+ _dataset_cache: Dict[str, Dict[str, Any]] = {}
80
+ _dataset_cache_lock = threading.Lock()
81
+ DATASET_CACHE_DURATION = 600 # 10 minutes in seconds
75
82
 
76
83
  _cleanup_lock = threading.Lock()
77
84
  _last_cleanup = 0
@@ -88,7 +95,7 @@ def get_executor(max_workers=None):
88
95
  if _executor is None:
89
96
  # Calculate optimal worker count
90
97
  if max_workers is None:
91
- max_workers = min(32, (os.cpu_count() or 1) * 4)
98
+ max_workers = min(8, (os.cpu_count() or 1) * 4)
92
99
 
93
100
  logger.info(f"Creating ThreadPoolExecutor with {max_workers} workers")
94
101
  _executor = concurrent.futures.ThreadPoolExecutor(
@@ -110,9 +117,57 @@ def generate_unique_task_id():
110
117
  unique_id = str(uuid.uuid4())[:8] # Short UUID
111
118
  return f"task_{int(time.time())}_{os.getpid()}_{counter}_{unique_id}"
112
119
 
120
+ def _generate_dataset_cache_key(dataset_name: str, project_name: str, base_url: str) -> str:
121
+ """Generate a unique cache key for dataset creation"""
122
+ return f"{dataset_name}#{project_name}#{base_url}"
123
+
124
+ def _is_dataset_cached(cache_key: str) -> bool:
125
+ """Check if dataset creation is cached and still valid"""
126
+ with _dataset_cache_lock:
127
+ if cache_key not in _dataset_cache:
128
+ return False
129
+
130
+ cache_entry = _dataset_cache[cache_key]
131
+ cache_time = cache_entry.get('timestamp', 0)
132
+ current_time = time.time()
133
+
134
+ # Check if cache is still valid (within 10 minutes)
135
+ if current_time - cache_time <= DATASET_CACHE_DURATION:
136
+ logger.info(f"Dataset creation cache hit for key: {cache_key}")
137
+ return True
138
+ else:
139
+ # Cache expired, remove it
140
+ logger.info(f"Dataset creation cache expired for key: {cache_key}")
141
+ del _dataset_cache[cache_key]
142
+ return False
143
+
144
+ def _cache_dataset_creation(cache_key: str, response: Any) -> None:
145
+ """Cache successful dataset creation"""
146
+ with _dataset_cache_lock:
147
+ _dataset_cache[cache_key] = {
148
+ 'timestamp': time.time(),
149
+ 'response': response
150
+ }
151
+
152
+ def _cleanup_expired_cache_entries() -> None:
153
+ """Remove expired cache entries"""
154
+ current_time = time.time()
155
+ with _dataset_cache_lock:
156
+ expired_keys = []
157
+ for cache_key, cache_entry in _dataset_cache.items():
158
+ cache_time = cache_entry.get('timestamp', 0)
159
+ if current_time - cache_time > DATASET_CACHE_DURATION:
160
+ expired_keys.append(cache_key)
161
+
162
+ for key in expired_keys:
163
+ del _dataset_cache[key]
164
+
165
+ if expired_keys:
166
+ logger.info(f"Cleaned up {len(expired_keys)} expired dataset cache entries")
167
+
113
168
  def process_upload(task_id: str, filepath: str, hash_id: str, zip_path: str,
114
169
  project_name: str, project_id: str, dataset_name: str,
115
- user_details: Dict[str, Any], base_url: str, timeout=120, fail_on_trace_error=True) -> Dict[str, Any]:
170
+ user_details: Dict[str, Any], base_url: str, tracer_type, timeout=120, fail_on_trace_error=True) -> Dict[str, Any]:
116
171
  """
117
172
  Process a single upload task
118
173
 
@@ -165,20 +220,36 @@ def process_upload(task_id: str, filepath: str, hash_id: str, zip_path: str,
165
220
  save_task_status(result)
166
221
  return result
167
222
 
168
- # Step 1: Create dataset schema
223
+ # Step 1: Create dataset schema (with caching)
169
224
  logger.info(f"Creating dataset schema for {dataset_name} with base_url: {base_url} and timeout: {timeout}")
170
- try:
171
- response = create_dataset_schema_with_trace(
172
- dataset_name=dataset_name,
173
- project_name=project_name,
174
- base_url=base_url,
175
- user_details=user_details,
176
- timeout=timeout
177
- )
178
- logger.info(f"Dataset schema created: {response}")
179
- except Exception as e:
180
- logger.error(f"Error creating dataset schema: {e}")
181
- # Continue with other steps
225
+
226
+ # Generate cache key and check if dataset creation is already cached
227
+ cache_key = _generate_dataset_cache_key(dataset_name, project_name, base_url)
228
+
229
+ if _is_dataset_cached(cache_key):
230
+ logger.info(f"Dataset schema creation skipped (cached) for {dataset_name}")
231
+ else:
232
+ try:
233
+ # Clean up expired cache entries periodically
234
+ # _cleanup_expired_cache_entries()
235
+
236
+ response = create_dataset_schema_with_trace(
237
+ dataset_name=dataset_name,
238
+ project_name=project_name,
239
+ base_url=base_url,
240
+ user_details=user_details,
241
+ timeout=timeout
242
+ )
243
+ logger.info(f"Dataset schema created: {response}")
244
+
245
+ # Cache the response only if status code is 200
246
+ if response and hasattr(response, 'status_code') and response.status_code in [200, 201]:
247
+ _cache_dataset_creation(cache_key, response)
248
+ logger.info(f"Response cached successfully for dataset: {dataset_name} and key: {cache_key}")
249
+
250
+ except Exception as e:
251
+ logger.error(f"Error creating dataset schema: {e}")
252
+ # Continue with other steps
182
253
 
183
254
  # Step 2: Upload trace metrics
184
255
  # if filepath and os.path.exists(filepath):
@@ -238,28 +309,34 @@ def process_upload(task_id: str, filepath: str, hash_id: str, zip_path: str,
238
309
  logger.error(error_msg)
239
310
 
240
311
  # Step 4: Upload code hash
241
- if hash_id and zip_path and os.path.exists(zip_path):
242
- logger.info(f"Uploading code hash {hash_id} with base_url: {base_url} and timeout: {timeout}")
243
- try:
244
- response = upload_code(
245
- hash_id=hash_id,
246
- zip_path=zip_path,
247
- project_name=project_name,
248
- dataset_name=dataset_name,
249
- base_url=base_url,
250
- timeout=timeout
251
- )
252
- logger.info(f"Code hash uploaded: {response}")
253
- except Exception as e:
254
- logger.error(f"Error uploading code hash: {e}")
255
- else:
256
- logger.warning(f"Code zip {zip_path} not found, skipping code upload")
257
-
312
+ if tracer_type.startswith("agentic/"):
313
+ logger.info(f"Tracer type '{tracer_type}' matches agentic pattern, proceeding with code upload")
314
+ if hash_id and zip_path and os.path.exists(zip_path):
315
+ logger.info(f"Uploading code hash {hash_id} with base_url: {base_url} and timeout: {timeout}")
316
+ try:
317
+ response = upload_code(
318
+ hash_id=hash_id,
319
+ zip_path=zip_path,
320
+ project_name=project_name,
321
+ dataset_name=dataset_name,
322
+ base_url=base_url,
323
+ timeout=timeout
324
+ )
325
+ if response is None:
326
+ error_msg = "Code hash not uploaded"
327
+ logger.error(error_msg)
328
+ else:
329
+ logger.info(f"Code hash uploaded successfully: {response}")
330
+ except Exception as e:
331
+ logger.error(f"Error uploading code hash: {e}")
332
+ else:
333
+ logger.warning(f"Code zip {zip_path} not found, skipping code upload")
334
+
258
335
  # Mark task as completed
259
336
  result["status"] = STATUS_COMPLETED
260
337
  result["end_time"] = datetime.now().isoformat()
261
338
  logger.info(f"Task {task_id} completed successfully")
262
-
339
+
263
340
  except Exception as e:
264
341
  logger.error(f"Error processing task {task_id}: {e}")
265
342
  result["status"] = STATUS_FAILED
@@ -302,7 +379,8 @@ def save_task_status(task_status: Dict[str, Any]):
302
379
  with open(status_path, "w") as f:
303
380
  json.dump(task_status, f, indent=2)
304
381
 
305
- def submit_upload_task(filepath, hash_id, zip_path, project_name, project_id, dataset_name, user_details, base_url, timeout=120):
382
+ def submit_upload_task(filepath, hash_id, zip_path, project_name, project_id, dataset_name, user_details, base_url,
383
+ tracer_type, timeout=120):
306
384
  """
307
385
  Submit a new upload task using futures.
308
386
 
@@ -349,6 +427,7 @@ def submit_upload_task(filepath, hash_id, zip_path, project_name, project_id, da
349
427
  dataset_name=dataset_name,
350
428
  user_details=user_details,
351
429
  base_url=base_url,
430
+ tracer_type = tracer_type,
352
431
  timeout=timeout,
353
432
  fail_on_trace_error=True
354
433
  )
@@ -379,6 +458,7 @@ def submit_upload_task(filepath, hash_id, zip_path, project_name, project_id, da
379
458
  dataset_name=dataset_name,
380
459
  user_details=user_details,
381
460
  base_url=base_url,
461
+ tracer_type=tracer_type,
382
462
  timeout=timeout,
383
463
  fail_on_trace_error=True
384
464
  )
@@ -550,6 +630,14 @@ def shutdown(timeout=120):
550
630
 
551
631
  _executor = None
552
632
 
633
+ # Close the session manager to clean up HTTP connections
634
+ if session_manager is not None:
635
+ try:
636
+ session_manager.close()
637
+ logger.info("Session manager closed successfully")
638
+ except Exception as e:
639
+ logger.error(f"Error closing session manager: {e}")
640
+
553
641
  # Register shutdown handler
554
642
  atexit.register(shutdown)
555
643