monocle-apptrace 0.1.0__py3-none-any.whl → 0.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.

Potentially problematic release.


This version of monocle-apptrace might be problematic. Click here for more details.

Files changed (41) hide show
  1. monocle_apptrace/README.md +50 -26
  2. monocle_apptrace/exporters/aws/s3_exporter.py +158 -0
  3. monocle_apptrace/exporters/azure/blob_exporter.py +128 -0
  4. monocle_apptrace/exporters/base_exporter.py +47 -0
  5. monocle_apptrace/exporters/exporter_processor.py +19 -0
  6. monocle_apptrace/exporters/monocle_exporters.py +27 -0
  7. monocle_apptrace/exporters/okahu/okahu_exporter.py +115 -0
  8. monocle_apptrace/haystack/__init__.py +4 -4
  9. monocle_apptrace/haystack/wrap_pipeline.py +18 -1
  10. monocle_apptrace/instrumentor.py +15 -18
  11. monocle_apptrace/langchain/__init__.py +6 -3
  12. monocle_apptrace/llamaindex/__init__.py +8 -7
  13. monocle_apptrace/metamodel/README.md +47 -0
  14. monocle_apptrace/metamodel/entities/README.md +77 -0
  15. monocle_apptrace/metamodel/entities/app_hosting_types.json +29 -0
  16. monocle_apptrace/metamodel/entities/entities.json +49 -0
  17. monocle_apptrace/metamodel/entities/inference_types.json +33 -0
  18. monocle_apptrace/metamodel/entities/model_types.json +41 -0
  19. monocle_apptrace/metamodel/entities/vector_store_types.json +25 -0
  20. monocle_apptrace/metamodel/entities/workflow_types.json +22 -0
  21. monocle_apptrace/metamodel/maps/attributes/inference/langchain_entities.json +35 -0
  22. monocle_apptrace/metamodel/maps/attributes/inference/llamaindex_entities.json +35 -0
  23. monocle_apptrace/metamodel/maps/attributes/retrieval/langchain_entities.json +27 -0
  24. monocle_apptrace/metamodel/maps/attributes/retrieval/llamaindex_entities.json +27 -0
  25. monocle_apptrace/{wrapper_config/lang_chain_methods.json → metamodel/maps/langchain_methods.json} +31 -8
  26. monocle_apptrace/{wrapper_config/llama_index_methods.json → metamodel/maps/llamaindex_methods.json} +12 -8
  27. monocle_apptrace/metamodel/spans/README.md +121 -0
  28. monocle_apptrace/metamodel/spans/span_example.json +140 -0
  29. monocle_apptrace/metamodel/spans/span_format.json +55 -0
  30. monocle_apptrace/metamodel/spans/span_types.json +16 -0
  31. monocle_apptrace/utils.py +108 -9
  32. monocle_apptrace/wrap_common.py +247 -98
  33. monocle_apptrace/wrapper.py +3 -1
  34. monocle_apptrace-0.2.0.dist-info/METADATA +115 -0
  35. monocle_apptrace-0.2.0.dist-info/RECORD +44 -0
  36. monocle_apptrace-0.1.0.dist-info/METADATA +0 -77
  37. monocle_apptrace-0.1.0.dist-info/RECORD +0 -22
  38. /monocle_apptrace/{wrapper_config → metamodel/maps}/haystack_methods.json +0 -0
  39. {monocle_apptrace-0.1.0.dist-info → monocle_apptrace-0.2.0.dist-info}/WHEEL +0 -0
  40. {monocle_apptrace-0.1.0.dist-info → monocle_apptrace-0.2.0.dist-info}/licenses/LICENSE +0 -0
  41. {monocle_apptrace-0.1.0.dist-info → monocle_apptrace-0.2.0.dist-info}/licenses/NOTICE +0 -0
@@ -1,77 +0,0 @@
1
- Metadata-Version: 2.3
2
- Name: monocle_apptrace
3
- Version: 0.1.0
4
- Summary: package with monocle genAI tracing
5
- Project-URL: Homepage, https://github.com/monocle2ai/monocle
6
- Project-URL: Issues, https://github.com/monocle2ai/monocle/issues
7
- License-File: LICENSE
8
- License-File: NOTICE
9
- Classifier: License :: OSI Approved :: MIT License
10
- Classifier: Operating System :: OS Independent
11
- Classifier: Programming Language :: Python :: 3
12
- Requires-Python: >=3.8
13
- Requires-Dist: opentelemetry-api>=1.21.0
14
- Requires-Dist: opentelemetry-instrumentation
15
- Requires-Dist: opentelemetry-sdk>=1.21.0
16
- Requires-Dist: requests
17
- Requires-Dist: wrapt>=1.14.0
18
- Provides-Extra: dev
19
- Requires-Dist: datasets==2.20.0; extra == 'dev'
20
- Requires-Dist: faiss-cpu==1.8.0; extra == 'dev'
21
- Requires-Dist: instructorembedding==1.0.1; extra == 'dev'
22
- Requires-Dist: langchain-chroma==0.1.1; extra == 'dev'
23
- Requires-Dist: langchain-community==0.2.5; extra == 'dev'
24
- Requires-Dist: langchain-openai==0.1.8; extra == 'dev'
25
- Requires-Dist: langchain==0.2.5; extra == 'dev'
26
- Requires-Dist: llama-index-embeddings-huggingface==0.2.0; extra == 'dev'
27
- Requires-Dist: llama-index-vector-stores-chroma==0.1.9; extra == 'dev'
28
- Requires-Dist: llama-index==0.10.30; extra == 'dev'
29
- Requires-Dist: numpy==1.26.4; extra == 'dev'
30
- Requires-Dist: parameterized==0.9.0; extra == 'dev'
31
- Requires-Dist: pytest==8.0.0; extra == 'dev'
32
- Requires-Dist: sentence-transformers==2.6.1; extra == 'dev'
33
- Requires-Dist: types-requests==2.31.0.20240106; extra == 'dev'
34
- Description-Content-Type: text/markdown
35
-
36
- # monocle genAI observability
37
- ### Background
38
- Generative AI (GenAI) is the type of AI used to create content such as conversations, images, or video based on prior learning from existing content. GenAI relies on foundational models, which are exceptionally large ML models trained on vast amounts of generalized and unlabeled data to perform variety of general tasks such as understanding language and generating new text, audio or images from user provided prompts in a human language. Foundational models (FM) work by using learned patterns and relationships from the training data to predict the next item in a sequence given a prompt. It is cheaper and faster for data scientists to use foundational models as starting points rather than building models from scratch to build ML apps.
39
- Large Language Models (LLMs) are a class of foundational models trained on text data used to perform a variety of tasks such as understanding language, reasoning over text, and generating new text based on user prompts in a human language. Examples of LLMs include ChatGPT, Llama, and Claude.
40
- LLM-based AI apps leverage understanding language, reasoning & text generation to augment or automate complex tasks that typically require human intervention such as summarizing legal documents, triaging customer support tickets, or more.
41
- Typically, AI developers build LLM-based AI apps that automate complex workflows by combining multiple LLMs and components such as prompts, vectors, or agents that each solve a discrete task that are connected by chains or pipelines in different ways using LLM (Large Language Model) orchestration frameworks.
42
- When deployed to production, different parts of multi-component distributed LLM-based AI apps run on a combination of different kinds of AI infrastructure such as LLM-as-a-Service, GPU (graphics processing units) clouds, managed services from cloud, or custom-engineered AI stack. Typically, these systems are managed in production by IT DevOps engineers.
43
- AI developers code, monitor, debug and optimize the resources in an LLM-based AI application. IT DevOps engineers monitor, troubleshoot, and optimize the services in the AI infra that the LLM-based AI application runs on.
44
-
45
- ## Introducing “Monocle – An eye for A.I.”
46
- The goal of project Monocle is to help GenAI developer to trace their applications. A typical GenAI application comprises of several technology components like application code/workflow, models, inferences services, vector databases etc. Understanding the dependencies and tracking application quickly becomes a difficult task. Monocle can be integrated into application code with very little to no code changes. Monocle supports tracing all GenAI technology components, application frameworks, LLM hosting services. We do all the hard work of finding what needs to be instrumented and how to instrument it. This enables the enlightened applications to generate detailed traces without any additional efforts from the developers.
47
- The traces are compatible with OpenTelemetry format. They are further enriched to contain lot more attribute relevant to GenAI applications like prompts. The project will have out of box support to store the traces locally and a extensibility for a third party store which can be implemented by end user or a supplied by third party vendors.
48
-
49
- ## Monocle integration
50
- ### genAI Appliation frameworks
51
- - Langchain
52
- - LlamaIndex
53
- - Haystack
54
- ### LLMs
55
- - OpenAI
56
- - Azure OpenAI
57
- - NVIDIA Triton
58
-
59
- ## Getting started
60
- ### Try Monocle with your python genAI application
61
- - Get latest Monocle python brary
62
- ```
63
- pip install monocle_apptrace
64
- ```
65
- - Enable Monocle tracing in your app by adding following
66
- ```
67
- setup_monocle_telemetry(workflow_name="your-app-name")
68
- ```
69
- Please refer to [Monocle user guide](Monocle_User_Guide.md) for more details
70
-
71
- ## Get involved
72
- ### Provide feedback
73
- - Submit issues and enhancements requests via Github issues
74
-
75
- ### Contribute
76
- - Monocle is community based open source project. We welcome your contributions. Please refer to the CONTRIBUTING and CODE_OF_CONDUCT for guidelines. The [contributor's guide](CONTRIBUTING.md) provides technical details of the project.
77
-
@@ -1,22 +0,0 @@
1
- monocle_apptrace/README.md,sha256=OVJgf1_HAm5L2-FSDZ-3AYfBjSxiT4fhE_CgKVaDVuQ,3104
2
- monocle_apptrace/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- monocle_apptrace/constants.py,sha256=wjObbmMTFL201x-bf3EOXevYygwkFH_1ng5dDrpE3z0,810
4
- monocle_apptrace/instrumentor.py,sha256=IDCuqzvTLzYKBzHGX3q1gbiboq07LMkdOA8DhOUTEEU,5051
5
- monocle_apptrace/utils.py,sha256=VMiWscPCNjp29IQE3ahprXjkfiMw160DbCo8WrjQCXk,2658
6
- monocle_apptrace/wrap_common.py,sha256=zbYlhL7V655exfdE0h_aT6-THmmHL1ltzsm4cBZ4jq8,10875
7
- monocle_apptrace/wrapper.py,sha256=cNUdfciAXNYAhvtOA2O4ONRvuT2bbHb4ax_7pALijEI,734
8
- monocle_apptrace/exporters/file_exporter.py,sha256=gN9pJ_X5pcstVVsyivgHsjWhr443eRa6Y6Hx1rGLQAM,2280
9
- monocle_apptrace/haystack/__init__.py,sha256=zcluKUIu1M9g_B3s_ZfzRS_vr7yMz5gj-6rqQ7bJ5B0,318
10
- monocle_apptrace/haystack/wrap_node.py,sha256=IK07Wn3Lk1Os9URsyrmB1HXOH2FNdzK9fNLlR8TZdYc,908
11
- monocle_apptrace/haystack/wrap_openai.py,sha256=Yp916DhOl0WI6virRi3L43snfsQm7PhI28wlDsg19v8,1536
12
- monocle_apptrace/haystack/wrap_pipeline.py,sha256=xRYMRzxvFPdcJ64E0bbMdMuWO_p3V1T7eIvb3-Um5DE,1661
13
- monocle_apptrace/langchain/__init__.py,sha256=HhvRJ_rl9cX4M8ckiOkJC7QHbklrttaY9RvDC51m1l4,268
14
- monocle_apptrace/llamaindex/__init__.py,sha256=3zmSNoVDjB-hh_M4eUr-hUP0bup7HKmWFVv_3xPAwsA,570
15
- monocle_apptrace/wrapper_config/haystack_methods.json,sha256=JmngkaKICAzOyrWNTWEOLYFrp99l5wcERYKE_SQRNxE,698
16
- monocle_apptrace/wrapper_config/lang_chain_methods.json,sha256=HaOhhxb3PkI7tXPxXhWR4cnWrnEHU--k5pOY9RS0Uew,3119
17
- monocle_apptrace/wrapper_config/llama_index_methods.json,sha256=qpODnBHkaDjPBYZNd7clwmp_2subTu-fmI08Ky5OWdg,2192
18
- monocle_apptrace-0.1.0.dist-info/METADATA,sha256=sQfm_x1NFthDhfMKX_ZDE0E5bDLSxUOtV1v6yXt0Wpc,5699
19
- monocle_apptrace-0.1.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
20
- monocle_apptrace-0.1.0.dist-info/licenses/LICENSE,sha256=ay9trLiP5I7ZsFXo6AqtkLYdRqe5S9r-DrPOvsNlZrg,9136
21
- monocle_apptrace-0.1.0.dist-info/licenses/NOTICE,sha256=9jn4xtwM_uUetJMx5WqGnhrR7MIhpoRlpokjSTlyt8c,112
22
- monocle_apptrace-0.1.0.dist-info/RECORD,,