lmnr 0.4.53.dev0__py3-none-any.whl → 0.7.26__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.
- lmnr/__init__.py +32 -11
- lmnr/cli/__init__.py +270 -0
- lmnr/cli/datasets.py +371 -0
- lmnr/cli/evals.py +111 -0
- lmnr/cli/rules.py +42 -0
- lmnr/opentelemetry_lib/__init__.py +70 -0
- lmnr/opentelemetry_lib/decorators/__init__.py +337 -0
- lmnr/opentelemetry_lib/litellm/__init__.py +685 -0
- lmnr/opentelemetry_lib/litellm/utils.py +100 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/anthropic/__init__.py +849 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/anthropic/config.py +13 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/anthropic/event_emitter.py +211 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/anthropic/event_models.py +41 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/anthropic/span_utils.py +401 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/anthropic/streaming.py +425 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/anthropic/utils.py +332 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/anthropic/version.py +1 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/claude_agent/__init__.py +451 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/claude_agent/proxy.py +144 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/cua_agent/__init__.py +100 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/cua_computer/__init__.py +476 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/cua_computer/utils.py +12 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/google_genai/__init__.py +599 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/google_genai/config.py +9 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/google_genai/schema_utils.py +26 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/google_genai/utils.py +330 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/groq/__init__.py +488 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/groq/config.py +8 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/groq/event_emitter.py +143 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/groq/event_models.py +41 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/groq/span_utils.py +229 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/groq/utils.py +92 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/groq/version.py +1 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/kernel/__init__.py +381 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/kernel/utils.py +36 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/langgraph/__init__.py +121 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/langgraph/utils.py +60 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/openai/__init__.py +61 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/openai/shared/__init__.py +472 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/openai/shared/chat_wrappers.py +1185 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/openai/shared/completion_wrappers.py +305 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/openai/shared/config.py +16 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/openai/shared/embeddings_wrappers.py +312 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/openai/shared/event_emitter.py +100 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/openai/shared/event_models.py +41 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/openai/shared/image_gen_wrappers.py +68 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/openai/utils.py +197 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/openai/v0/__init__.py +176 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/openai/v1/__init__.py +368 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/openai/v1/assistant_wrappers.py +325 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/openai/v1/event_handler_wrapper.py +135 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/openai/v1/responses_wrappers.py +786 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/openai/version.py +1 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/openhands_ai/__init__.py +388 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/opentelemetry/__init__.py +69 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/skyvern/__init__.py +191 -0
- lmnr/opentelemetry_lib/opentelemetry/instrumentation/threading/__init__.py +197 -0
- lmnr/opentelemetry_lib/tracing/__init__.py +263 -0
- lmnr/opentelemetry_lib/tracing/_instrument_initializers.py +516 -0
- lmnr/{openllmetry_sdk → opentelemetry_lib}/tracing/attributes.py +21 -8
- lmnr/opentelemetry_lib/tracing/context.py +200 -0
- lmnr/opentelemetry_lib/tracing/exporter.py +153 -0
- lmnr/opentelemetry_lib/tracing/instruments.py +140 -0
- lmnr/opentelemetry_lib/tracing/processor.py +193 -0
- lmnr/opentelemetry_lib/tracing/span.py +398 -0
- lmnr/opentelemetry_lib/tracing/tracer.py +57 -0
- lmnr/opentelemetry_lib/tracing/utils.py +62 -0
- lmnr/opentelemetry_lib/utils/package_check.py +18 -0
- lmnr/opentelemetry_lib/utils/wrappers.py +11 -0
- lmnr/sdk/browser/__init__.py +0 -0
- lmnr/sdk/browser/background_send_events.py +158 -0
- lmnr/sdk/browser/browser_use_cdp_otel.py +100 -0
- lmnr/sdk/browser/browser_use_otel.py +142 -0
- lmnr/sdk/browser/bubus_otel.py +71 -0
- lmnr/sdk/browser/cdp_utils.py +518 -0
- lmnr/sdk/browser/inject_script.js +514 -0
- lmnr/sdk/browser/patchright_otel.py +151 -0
- lmnr/sdk/browser/playwright_otel.py +322 -0
- lmnr/sdk/browser/pw_utils.py +363 -0
- lmnr/sdk/browser/recorder/record.umd.min.cjs +84 -0
- lmnr/sdk/browser/utils.py +70 -0
- lmnr/sdk/client/asynchronous/async_client.py +180 -0
- lmnr/sdk/client/asynchronous/resources/__init__.py +6 -0
- lmnr/sdk/client/asynchronous/resources/base.py +32 -0
- lmnr/sdk/client/asynchronous/resources/browser_events.py +41 -0
- lmnr/sdk/client/asynchronous/resources/datasets.py +131 -0
- lmnr/sdk/client/asynchronous/resources/evals.py +266 -0
- lmnr/sdk/client/asynchronous/resources/evaluators.py +85 -0
- lmnr/sdk/client/asynchronous/resources/tags.py +83 -0
- lmnr/sdk/client/synchronous/resources/__init__.py +6 -0
- lmnr/sdk/client/synchronous/resources/base.py +32 -0
- lmnr/sdk/client/synchronous/resources/browser_events.py +40 -0
- lmnr/sdk/client/synchronous/resources/datasets.py +131 -0
- lmnr/sdk/client/synchronous/resources/evals.py +263 -0
- lmnr/sdk/client/synchronous/resources/evaluators.py +85 -0
- lmnr/sdk/client/synchronous/resources/tags.py +83 -0
- lmnr/sdk/client/synchronous/sync_client.py +191 -0
- lmnr/sdk/datasets/__init__.py +94 -0
- lmnr/sdk/datasets/file_utils.py +91 -0
- lmnr/sdk/decorators.py +163 -26
- lmnr/sdk/eval_control.py +3 -2
- lmnr/sdk/evaluations.py +403 -191
- lmnr/sdk/laminar.py +1080 -549
- lmnr/sdk/log.py +7 -2
- lmnr/sdk/types.py +246 -134
- lmnr/sdk/utils.py +151 -7
- lmnr/version.py +46 -0
- {lmnr-0.4.53.dev0.dist-info → lmnr-0.7.26.dist-info}/METADATA +152 -106
- lmnr-0.7.26.dist-info/RECORD +116 -0
- lmnr-0.7.26.dist-info/WHEEL +4 -0
- lmnr-0.7.26.dist-info/entry_points.txt +3 -0
- lmnr/cli.py +0 -101
- lmnr/openllmetry_sdk/.python-version +0 -1
- lmnr/openllmetry_sdk/__init__.py +0 -72
- lmnr/openllmetry_sdk/config/__init__.py +0 -9
- lmnr/openllmetry_sdk/decorators/base.py +0 -185
- lmnr/openllmetry_sdk/instruments.py +0 -38
- lmnr/openllmetry_sdk/tracing/__init__.py +0 -1
- lmnr/openllmetry_sdk/tracing/content_allow_list.py +0 -24
- lmnr/openllmetry_sdk/tracing/context_manager.py +0 -13
- lmnr/openllmetry_sdk/tracing/tracing.py +0 -884
- lmnr/openllmetry_sdk/utils/in_memory_span_exporter.py +0 -61
- lmnr/openllmetry_sdk/utils/package_check.py +0 -7
- lmnr/openllmetry_sdk/version.py +0 -1
- lmnr/sdk/datasets.py +0 -55
- lmnr-0.4.53.dev0.dist-info/LICENSE +0 -75
- lmnr-0.4.53.dev0.dist-info/RECORD +0 -33
- lmnr-0.4.53.dev0.dist-info/WHEEL +0 -4
- lmnr-0.4.53.dev0.dist-info/entry_points.txt +0 -3
- /lmnr/{openllmetry_sdk → opentelemetry_lib}/.flake8 +0 -0
- /lmnr/{openllmetry_sdk → opentelemetry_lib}/utils/__init__.py +0 -0
- /lmnr/{openllmetry_sdk → opentelemetry_lib}/utils/json_encoder.py +0 -0
- /lmnr/{openllmetry_sdk/decorators/__init__.py → py.typed} +0 -0
lmnr/version.py
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
import httpx
|
|
3
|
+
from packaging import version
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
__version__ = "0.7.26"
|
|
7
|
+
PYTHON_VERSION = f"{sys.version_info.major}.{sys.version_info.minor}"
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def is_latest_version() -> bool:
|
|
11
|
+
try:
|
|
12
|
+
return version.parse(__version__) >= version.parse(get_latest_pypi_version())
|
|
13
|
+
except Exception:
|
|
14
|
+
return True
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def get_latest_pypi_version() -> str:
|
|
18
|
+
"""
|
|
19
|
+
Get the latest stable version of lmnr package from PyPI.
|
|
20
|
+
Returns the version string or raises an exception if unable to fetch.
|
|
21
|
+
"""
|
|
22
|
+
try:
|
|
23
|
+
response = httpx.get("https://pypi.org/pypi/lmnr/json")
|
|
24
|
+
response.raise_for_status()
|
|
25
|
+
|
|
26
|
+
releases = response.json()["releases"]
|
|
27
|
+
stable_versions = [
|
|
28
|
+
ver
|
|
29
|
+
for ver in releases.keys()
|
|
30
|
+
if not version.parse(ver).is_prerelease
|
|
31
|
+
and not version.parse(ver).is_devrelease
|
|
32
|
+
and not any(release.get("yanked", False) for release in releases[ver])
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
if not stable_versions:
|
|
36
|
+
# do not scare the user, assume they are on
|
|
37
|
+
# latest version
|
|
38
|
+
return __version__
|
|
39
|
+
|
|
40
|
+
latest_version = max(stable_versions, key=version.parse)
|
|
41
|
+
return latest_version
|
|
42
|
+
|
|
43
|
+
except Exception:
|
|
44
|
+
# do not scare the user, assume they are on
|
|
45
|
+
# latest version
|
|
46
|
+
return __version__
|
|
@@ -1,35 +1,98 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: lmnr
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7.26
|
|
4
4
|
Summary: Python SDK for Laminar
|
|
5
|
-
License: Apache-2.0
|
|
6
5
|
Author: lmnr.ai
|
|
7
|
-
Author-email: founders@lmnr.ai
|
|
8
|
-
|
|
6
|
+
Author-email: lmnr.ai <founders@lmnr.ai>
|
|
7
|
+
License-Expression: Apache-2.0
|
|
9
8
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
10
9
|
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
12
10
|
Classifier: Programming Language :: Python :: 3.10
|
|
13
11
|
Classifier: Programming Language :: Python :: 3.11
|
|
14
12
|
Classifier: Programming Language :: Python :: 3.12
|
|
15
13
|
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
15
|
+
Requires-Dist: pydantic>=2.0.3,<3.0.0
|
|
16
|
+
Requires-Dist: python-dotenv>=1.0
|
|
17
|
+
Requires-Dist: opentelemetry-api>=1.33.0
|
|
18
|
+
Requires-Dist: opentelemetry-sdk>=1.33.0
|
|
19
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.33.0
|
|
20
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc>=1.33.0
|
|
21
|
+
Requires-Dist: opentelemetry-instrumentation>=0.54b0
|
|
22
|
+
Requires-Dist: opentelemetry-semantic-conventions>=0.54b0
|
|
23
|
+
Requires-Dist: opentelemetry-semantic-conventions-ai>=0.4.13
|
|
24
|
+
Requires-Dist: tqdm>=4.0
|
|
25
|
+
Requires-Dist: tenacity>=8.0
|
|
26
|
+
Requires-Dist: grpcio>=1
|
|
27
|
+
Requires-Dist: httpx>=0.24.0
|
|
28
|
+
Requires-Dist: orjson>=3.0.0
|
|
29
|
+
Requires-Dist: packaging>=22.0
|
|
30
|
+
Requires-Dist: opentelemetry-instrumentation-threading>=0.57b0
|
|
31
|
+
Requires-Dist: opentelemetry-instrumentation-alephalpha>=0.47.1 ; extra == 'alephalpha'
|
|
32
|
+
Requires-Dist: lmnr-claude-code-proxy>=0.1.5 ; extra == 'all'
|
|
33
|
+
Requires-Dist: opentelemetry-instrumentation-alephalpha>=0.47.1 ; extra == 'all'
|
|
34
|
+
Requires-Dist: opentelemetry-instrumentation-bedrock>=0.47.1 ; extra == 'all'
|
|
35
|
+
Requires-Dist: opentelemetry-instrumentation-chromadb>=0.47.1 ; extra == 'all'
|
|
36
|
+
Requires-Dist: opentelemetry-instrumentation-cohere>=0.47.1 ; extra == 'all'
|
|
37
|
+
Requires-Dist: opentelemetry-instrumentation-crewai>=0.47.1 ; extra == 'all'
|
|
38
|
+
Requires-Dist: opentelemetry-instrumentation-haystack>=0.47.1 ; extra == 'all'
|
|
39
|
+
Requires-Dist: opentelemetry-instrumentation-lancedb>=0.47.1 ; extra == 'all'
|
|
40
|
+
Requires-Dist: opentelemetry-instrumentation-langchain>=0.47.1,<0.48.0 ; extra == 'all'
|
|
41
|
+
Requires-Dist: opentelemetry-instrumentation-llamaindex>=0.47.1 ; extra == 'all'
|
|
42
|
+
Requires-Dist: opentelemetry-instrumentation-marqo>=0.47.1 ; extra == 'all'
|
|
43
|
+
Requires-Dist: opentelemetry-instrumentation-mcp>=0.47.1 ; extra == 'all'
|
|
44
|
+
Requires-Dist: opentelemetry-instrumentation-milvus>=0.47.1 ; extra == 'all'
|
|
45
|
+
Requires-Dist: opentelemetry-instrumentation-mistralai>=0.47.1 ; extra == 'all'
|
|
46
|
+
Requires-Dist: opentelemetry-instrumentation-ollama>=0.47.1 ; extra == 'all'
|
|
47
|
+
Requires-Dist: opentelemetry-instrumentation-pinecone>=0.47.1 ; extra == 'all'
|
|
48
|
+
Requires-Dist: opentelemetry-instrumentation-qdrant>=0.47.1 ; extra == 'all'
|
|
49
|
+
Requires-Dist: opentelemetry-instrumentation-replicate>=0.47.1 ; extra == 'all'
|
|
50
|
+
Requires-Dist: opentelemetry-instrumentation-sagemaker>=0.47.1 ; extra == 'all'
|
|
51
|
+
Requires-Dist: opentelemetry-instrumentation-together>=0.47.1 ; extra == 'all'
|
|
52
|
+
Requires-Dist: opentelemetry-instrumentation-transformers>=0.47.1 ; extra == 'all'
|
|
53
|
+
Requires-Dist: opentelemetry-instrumentation-vertexai>=0.47.1 ; extra == 'all'
|
|
54
|
+
Requires-Dist: opentelemetry-instrumentation-watsonx>=0.47.1 ; extra == 'all'
|
|
55
|
+
Requires-Dist: opentelemetry-instrumentation-weaviate>=0.47.1 ; extra == 'all'
|
|
56
|
+
Requires-Dist: opentelemetry-instrumentation-bedrock>=0.47.1 ; extra == 'bedrock'
|
|
57
|
+
Requires-Dist: opentelemetry-instrumentation-chromadb>=0.47.1 ; extra == 'chromadb'
|
|
58
|
+
Requires-Dist: lmnr-claude-code-proxy>=0.1.5 ; extra == 'claude-agent-sdk'
|
|
59
|
+
Requires-Dist: opentelemetry-instrumentation-cohere>=0.47.1 ; extra == 'cohere'
|
|
60
|
+
Requires-Dist: opentelemetry-instrumentation-crewai>=0.47.1 ; extra == 'crewai'
|
|
61
|
+
Requires-Dist: opentelemetry-instrumentation-haystack>=0.47.1 ; extra == 'haystack'
|
|
62
|
+
Requires-Dist: opentelemetry-instrumentation-lancedb>=0.47.1 ; extra == 'lancedb'
|
|
63
|
+
Requires-Dist: opentelemetry-instrumentation-langchain>=0.47.1,<0.48.0 ; extra == 'langchain'
|
|
64
|
+
Requires-Dist: opentelemetry-instrumentation-llamaindex>=0.47.1 ; extra == 'llamaindex'
|
|
65
|
+
Requires-Dist: opentelemetry-instrumentation-marqo>=0.47.1 ; extra == 'marqo'
|
|
66
|
+
Requires-Dist: opentelemetry-instrumentation-mcp>=0.47.1 ; extra == 'mcp'
|
|
67
|
+
Requires-Dist: opentelemetry-instrumentation-milvus>=0.47.1 ; extra == 'milvus'
|
|
68
|
+
Requires-Dist: opentelemetry-instrumentation-mistralai>=0.47.1 ; extra == 'mistralai'
|
|
69
|
+
Requires-Dist: opentelemetry-instrumentation-ollama>=0.47.1 ; extra == 'ollama'
|
|
70
|
+
Requires-Dist: opentelemetry-instrumentation-pinecone>=0.47.1 ; extra == 'pinecone'
|
|
71
|
+
Requires-Dist: opentelemetry-instrumentation-qdrant>=0.47.1 ; extra == 'qdrant'
|
|
72
|
+
Requires-Dist: opentelemetry-instrumentation-replicate>=0.47.1 ; extra == 'replicate'
|
|
73
|
+
Requires-Dist: opentelemetry-instrumentation-sagemaker>=0.47.1 ; extra == 'sagemaker'
|
|
74
|
+
Requires-Dist: opentelemetry-instrumentation-together>=0.47.1 ; extra == 'together'
|
|
75
|
+
Requires-Dist: opentelemetry-instrumentation-transformers>=0.47.1 ; extra == 'transformers'
|
|
76
|
+
Requires-Dist: opentelemetry-instrumentation-vertexai>=0.47.1 ; extra == 'vertexai'
|
|
77
|
+
Requires-Dist: opentelemetry-instrumentation-watsonx>=0.47.1 ; extra == 'watsonx'
|
|
78
|
+
Requires-Dist: opentelemetry-instrumentation-weaviate>=0.47.1 ; extra == 'weaviate'
|
|
79
|
+
Requires-Python: >=3.10, <4
|
|
16
80
|
Provides-Extra: alephalpha
|
|
17
81
|
Provides-Extra: all
|
|
18
|
-
Provides-Extra: anthropic
|
|
19
82
|
Provides-Extra: bedrock
|
|
20
83
|
Provides-Extra: chromadb
|
|
84
|
+
Provides-Extra: claude-agent-sdk
|
|
21
85
|
Provides-Extra: cohere
|
|
22
|
-
Provides-Extra:
|
|
23
|
-
Provides-Extra: groq
|
|
86
|
+
Provides-Extra: crewai
|
|
24
87
|
Provides-Extra: haystack
|
|
25
88
|
Provides-Extra: lancedb
|
|
26
89
|
Provides-Extra: langchain
|
|
27
90
|
Provides-Extra: llamaindex
|
|
28
91
|
Provides-Extra: marqo
|
|
92
|
+
Provides-Extra: mcp
|
|
29
93
|
Provides-Extra: milvus
|
|
30
94
|
Provides-Extra: mistralai
|
|
31
95
|
Provides-Extra: ollama
|
|
32
|
-
Provides-Extra: openai
|
|
33
96
|
Provides-Extra: pinecone
|
|
34
97
|
Provides-Extra: qdrant
|
|
35
98
|
Provides-Extra: replicate
|
|
@@ -39,73 +102,6 @@ Provides-Extra: transformers
|
|
|
39
102
|
Provides-Extra: vertexai
|
|
40
103
|
Provides-Extra: watsonx
|
|
41
104
|
Provides-Extra: weaviate
|
|
42
|
-
Requires-Dist: aiohttp (>=3.0)
|
|
43
|
-
Requires-Dist: argparse (>=1.0)
|
|
44
|
-
Requires-Dist: deprecated (>=1.0)
|
|
45
|
-
Requires-Dist: opentelemetry-api (>=1.27.0)
|
|
46
|
-
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc (>=1.27.0)
|
|
47
|
-
Requires-Dist: opentelemetry-exporter-otlp-proto-http (>=1.27.0)
|
|
48
|
-
Requires-Dist: opentelemetry-instrumentation-alephalpha (==0.33.9) ; extra == "alephalpha"
|
|
49
|
-
Requires-Dist: opentelemetry-instrumentation-alephalpha (==0.33.9) ; extra == "all"
|
|
50
|
-
Requires-Dist: opentelemetry-instrumentation-anthropic (==0.33.9) ; extra == "all"
|
|
51
|
-
Requires-Dist: opentelemetry-instrumentation-anthropic (==0.33.9) ; extra == "anthropic"
|
|
52
|
-
Requires-Dist: opentelemetry-instrumentation-bedrock (==0.33.9) ; extra == "all"
|
|
53
|
-
Requires-Dist: opentelemetry-instrumentation-bedrock (==0.33.9) ; extra == "bedrock"
|
|
54
|
-
Requires-Dist: opentelemetry-instrumentation-chromadb (==0.33.9) ; extra == "all"
|
|
55
|
-
Requires-Dist: opentelemetry-instrumentation-chromadb (==0.33.9) ; extra == "chromadb"
|
|
56
|
-
Requires-Dist: opentelemetry-instrumentation-cohere (==0.33.9) ; extra == "all"
|
|
57
|
-
Requires-Dist: opentelemetry-instrumentation-cohere (==0.33.9) ; extra == "cohere"
|
|
58
|
-
Requires-Dist: opentelemetry-instrumentation-google-generativeai (==0.33.9) ; extra == "all"
|
|
59
|
-
Requires-Dist: opentelemetry-instrumentation-google-generativeai (==0.33.9) ; extra == "google-generativeai"
|
|
60
|
-
Requires-Dist: opentelemetry-instrumentation-groq (==0.33.9) ; extra == "all"
|
|
61
|
-
Requires-Dist: opentelemetry-instrumentation-groq (==0.33.9) ; extra == "groq"
|
|
62
|
-
Requires-Dist: opentelemetry-instrumentation-haystack (==0.33.9) ; extra == "all"
|
|
63
|
-
Requires-Dist: opentelemetry-instrumentation-haystack (==0.33.9) ; extra == "haystack"
|
|
64
|
-
Requires-Dist: opentelemetry-instrumentation-lancedb (==0.33.9) ; extra == "all"
|
|
65
|
-
Requires-Dist: opentelemetry-instrumentation-lancedb (==0.33.9) ; extra == "lancedb"
|
|
66
|
-
Requires-Dist: opentelemetry-instrumentation-langchain (==0.33.9) ; extra == "all"
|
|
67
|
-
Requires-Dist: opentelemetry-instrumentation-langchain (==0.33.9) ; extra == "langchain"
|
|
68
|
-
Requires-Dist: opentelemetry-instrumentation-llamaindex (==0.33.9) ; extra == "all"
|
|
69
|
-
Requires-Dist: opentelemetry-instrumentation-llamaindex (==0.33.9) ; extra == "llamaindex"
|
|
70
|
-
Requires-Dist: opentelemetry-instrumentation-marqo (==0.33.9) ; extra == "all"
|
|
71
|
-
Requires-Dist: opentelemetry-instrumentation-marqo (==0.33.9) ; extra == "marqo"
|
|
72
|
-
Requires-Dist: opentelemetry-instrumentation-milvus (==0.33.9) ; extra == "all"
|
|
73
|
-
Requires-Dist: opentelemetry-instrumentation-milvus (==0.33.9) ; extra == "milvus"
|
|
74
|
-
Requires-Dist: opentelemetry-instrumentation-mistralai (==0.33.9) ; extra == "all"
|
|
75
|
-
Requires-Dist: opentelemetry-instrumentation-mistralai (==0.33.9) ; extra == "mistralai"
|
|
76
|
-
Requires-Dist: opentelemetry-instrumentation-ollama (==0.33.9) ; extra == "all"
|
|
77
|
-
Requires-Dist: opentelemetry-instrumentation-ollama (==0.33.9) ; extra == "ollama"
|
|
78
|
-
Requires-Dist: opentelemetry-instrumentation-openai (==0.33.9) ; extra == "all"
|
|
79
|
-
Requires-Dist: opentelemetry-instrumentation-openai (==0.33.9) ; extra == "openai"
|
|
80
|
-
Requires-Dist: opentelemetry-instrumentation-pinecone (==0.33.9) ; extra == "all"
|
|
81
|
-
Requires-Dist: opentelemetry-instrumentation-pinecone (==0.33.9) ; extra == "pinecone"
|
|
82
|
-
Requires-Dist: opentelemetry-instrumentation-qdrant (==0.33.9) ; extra == "all"
|
|
83
|
-
Requires-Dist: opentelemetry-instrumentation-qdrant (==0.33.9) ; extra == "qdrant"
|
|
84
|
-
Requires-Dist: opentelemetry-instrumentation-replicate (==0.33.9) ; extra == "all"
|
|
85
|
-
Requires-Dist: opentelemetry-instrumentation-replicate (==0.33.9) ; extra == "replicate"
|
|
86
|
-
Requires-Dist: opentelemetry-instrumentation-requests (==0.48b0)
|
|
87
|
-
Requires-Dist: opentelemetry-instrumentation-sagemaker (==0.33.9) ; extra == "all"
|
|
88
|
-
Requires-Dist: opentelemetry-instrumentation-sagemaker (==0.33.9) ; extra == "sagemaker"
|
|
89
|
-
Requires-Dist: opentelemetry-instrumentation-sqlalchemy (==0.48b0)
|
|
90
|
-
Requires-Dist: opentelemetry-instrumentation-threading (==0.48b0)
|
|
91
|
-
Requires-Dist: opentelemetry-instrumentation-together (==0.33.9) ; extra == "all"
|
|
92
|
-
Requires-Dist: opentelemetry-instrumentation-together (==0.33.9) ; extra == "together"
|
|
93
|
-
Requires-Dist: opentelemetry-instrumentation-transformers (==0.33.9) ; extra == "all"
|
|
94
|
-
Requires-Dist: opentelemetry-instrumentation-transformers (==0.33.9) ; extra == "transformers"
|
|
95
|
-
Requires-Dist: opentelemetry-instrumentation-urllib3 (==0.48b0)
|
|
96
|
-
Requires-Dist: opentelemetry-instrumentation-vertexai (==0.33.9) ; extra == "all"
|
|
97
|
-
Requires-Dist: opentelemetry-instrumentation-vertexai (==0.33.9) ; extra == "vertexai"
|
|
98
|
-
Requires-Dist: opentelemetry-instrumentation-watsonx (==0.33.9) ; extra == "all"
|
|
99
|
-
Requires-Dist: opentelemetry-instrumentation-watsonx (==0.33.9) ; extra == "watsonx"
|
|
100
|
-
Requires-Dist: opentelemetry-instrumentation-weaviate (==0.33.9) ; extra == "all"
|
|
101
|
-
Requires-Dist: opentelemetry-instrumentation-weaviate (==0.33.9) ; extra == "weaviate"
|
|
102
|
-
Requires-Dist: opentelemetry-sdk (>=1.27.0)
|
|
103
|
-
Requires-Dist: opentelemetry-semantic-conventions-ai (>=0.4.2)
|
|
104
|
-
Requires-Dist: pydantic (>=2.0.3)
|
|
105
|
-
Requires-Dist: python-dotenv (>=1.0)
|
|
106
|
-
Requires-Dist: requests (>=2.0)
|
|
107
|
-
Requires-Dist: tenacity (>=8.0)
|
|
108
|
-
Requires-Dist: tqdm (>=4.0)
|
|
109
105
|
Description-Content-Type: text/markdown
|
|
110
106
|
|
|
111
107
|
# Laminar Python
|
|
@@ -145,7 +141,28 @@ from lmnr import Laminar
|
|
|
145
141
|
Laminar.initialize(project_api_key="<PROJECT_API_KEY>")
|
|
146
142
|
```
|
|
147
143
|
|
|
148
|
-
|
|
144
|
+
You can also skip passing the `project_api_key`, in which case it will be looked
|
|
145
|
+
in the environment (or local .env file) by the key `LMNR_PROJECT_API_KEY`.
|
|
146
|
+
|
|
147
|
+
Note that you need to only initialize Laminar once in your application. You should
|
|
148
|
+
try to do that as early as possible in your application, e.g. at server startup.
|
|
149
|
+
|
|
150
|
+
## Set-up for self-hosting
|
|
151
|
+
|
|
152
|
+
If you self-host a Laminar instance, the default connection settings to it are
|
|
153
|
+
`http://localhost:8000` for HTTP and `http://localhost:8001` for gRPC. Initialize
|
|
154
|
+
the SDK accordingly:
|
|
155
|
+
|
|
156
|
+
```python
|
|
157
|
+
from lmnr import Laminar
|
|
158
|
+
|
|
159
|
+
Laminar.initialize(
|
|
160
|
+
project_api_key="<PROJECT_API_KEY>",
|
|
161
|
+
base_url="http://localhost",
|
|
162
|
+
http_port=8000,
|
|
163
|
+
grpc_port=8001,
|
|
164
|
+
)
|
|
165
|
+
```
|
|
149
166
|
|
|
150
167
|
## Instrumentation
|
|
151
168
|
|
|
@@ -202,7 +219,7 @@ def handle_user_request(topic: str):
|
|
|
202
219
|
Laminar allows you to automatically instrument majority of the most popular LLM, Vector DB, database, requests, and other libraries.
|
|
203
220
|
|
|
204
221
|
If you want to automatically instrument a default set of libraries, then simply do NOT pass `instruments` argument to `.initialize()`.
|
|
205
|
-
See the full list of available instrumentations in the [enum](https://github.com/lmnr-ai/lmnr-python/blob/main/src/lmnr/
|
|
222
|
+
See the full list of available instrumentations in the [enum](https://github.com/lmnr-ai/lmnr-python/blob/main/src/lmnr/opentelemetry_lib/instruments.py).
|
|
206
223
|
|
|
207
224
|
If you want to automatically instrument only specific LLM, Vector DB, or other
|
|
208
225
|
calls with OpenTelemetry-compatible instrumentation, then pass the appropriate instruments to `.initialize()`.
|
|
@@ -281,49 +298,78 @@ You can run evaluations locally by providing executor (part of the logic used in
|
|
|
281
298
|
|
|
282
299
|
Read the [docs](https://docs.lmnr.ai/evaluations/introduction) to learn more about evaluations.
|
|
283
300
|
|
|
284
|
-
##
|
|
301
|
+
## Client for HTTP operations
|
|
285
302
|
|
|
286
|
-
|
|
303
|
+
Various interactions with Laminar [API](https://docs.lmnr.ai/api-reference/) are available in `LaminarClient`
|
|
304
|
+
and its asynchronous version `AsyncLaminarClient`.
|
|
287
305
|
|
|
288
|
-
|
|
306
|
+
### Agent
|
|
289
307
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
Example use:
|
|
308
|
+
To run Laminar agent, you can invoke `client.agent.run`
|
|
293
309
|
|
|
294
310
|
```python
|
|
295
|
-
from lmnr import
|
|
311
|
+
from lmnr import LaminarClient
|
|
296
312
|
|
|
297
|
-
|
|
313
|
+
client = LaminarClient(project_api_key="<YOUR_PROJECT_API_KEY>")
|
|
298
314
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
inputs = {'input_node_name': 'some_value'},
|
|
302
|
-
# all environment variables
|
|
303
|
-
env = {'OPENAI_API_KEY': 'sk-some-key'},
|
|
315
|
+
response = client.agent.run(
|
|
316
|
+
prompt="What is the weather in London today?"
|
|
304
317
|
)
|
|
318
|
+
|
|
319
|
+
print(response.result.content)
|
|
305
320
|
```
|
|
306
321
|
|
|
307
|
-
|
|
322
|
+
#### Streaming
|
|
323
|
+
|
|
324
|
+
Agent run supports streaming as well.
|
|
308
325
|
|
|
309
326
|
```python
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
327
|
+
from lmnr import LaminarClient
|
|
328
|
+
|
|
329
|
+
client = LaminarClient(project_api_key="<YOUR_PROJECT_API_KEY>")
|
|
330
|
+
|
|
331
|
+
for chunk in client.agent.run(
|
|
332
|
+
prompt="What is the weather in London today?",
|
|
333
|
+
stream=True
|
|
334
|
+
):
|
|
335
|
+
if chunk.chunk_type == 'step':
|
|
336
|
+
print(chunk.summary)
|
|
337
|
+
elif chunk.chunk_type == 'finalOutput':
|
|
338
|
+
print(chunk.content.result.content)
|
|
316
339
|
```
|
|
317
340
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
You can perform a semantic search on a dataset in Laminar by calling `Laminar.semantic_search`.
|
|
341
|
+
#### Async mode
|
|
321
342
|
|
|
322
343
|
```python
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
344
|
+
from lmnr import AsyncLaminarClient
|
|
345
|
+
|
|
346
|
+
client = AsyncLaminarClient(project_api_key="<YOUR_PROJECT_API_KEY>")
|
|
347
|
+
|
|
348
|
+
response = await client.agent.run(
|
|
349
|
+
prompt="What is the weather in London today?"
|
|
326
350
|
)
|
|
351
|
+
|
|
352
|
+
print(response.result.content)
|
|
327
353
|
```
|
|
328
354
|
|
|
329
|
-
|
|
355
|
+
#### Async mode with streaming
|
|
356
|
+
|
|
357
|
+
```python
|
|
358
|
+
from lmnr import AsyncLaminarClient
|
|
359
|
+
|
|
360
|
+
client = AsyncLaminarClient(project_api_key="<YOUR_PROJECT_API_KEY>")
|
|
361
|
+
|
|
362
|
+
# Note that you need to await the operation even though we use `async for` below
|
|
363
|
+
response = await client.agent.run(
|
|
364
|
+
prompt="What is the weather in London today?",
|
|
365
|
+
stream=True
|
|
366
|
+
)
|
|
367
|
+
async for chunk in client.agent.run(
|
|
368
|
+
prompt="What is the weather in London today?",
|
|
369
|
+
stream=True
|
|
370
|
+
):
|
|
371
|
+
if chunk.chunk_type == 'step':
|
|
372
|
+
print(chunk.summary)
|
|
373
|
+
elif chunk.chunk_type == 'finalOutput':
|
|
374
|
+
print(chunk.content.result.content)
|
|
375
|
+
```
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
lmnr/__init__.py,sha256=8whrAv4qzI6Wj5TagASVPfWdJBQMS4K9gozOlqDyGMw,1266
|
|
2
|
+
lmnr/cli/__init__.py,sha256=uUU3TICBJU5m4dd90b1N1w0oUnIqIfa_fofQc6MpXMI,9373
|
|
3
|
+
lmnr/cli/datasets.py,sha256=63rFhUVbEpi9HmoDPYpkQbAluLcVuDhQerV2Aw9Z0lg,11115
|
|
4
|
+
lmnr/cli/evals.py,sha256=FF6FSnFh1Xlmc7t1h_2iQzKrhRWod9w3_txELAUdq9s,3734
|
|
5
|
+
lmnr/cli/rules.py,sha256=Te6e0pXj-TcYgi36nfvZq_QAkoUBLmekP7ia9SffRK0,1279
|
|
6
|
+
lmnr/opentelemetry_lib/.flake8,sha256=bCxuDlGx3YQ55QHKPiGJkncHanh9qGjQJUujcFa3lAU,150
|
|
7
|
+
lmnr/opentelemetry_lib/__init__.py,sha256=aOlQ-UM-Ih6CfmL3OypziiO31BByVURI3N01OMu2UNM,2515
|
|
8
|
+
lmnr/opentelemetry_lib/decorators/__init__.py,sha256=EudU5hOEvclPKi36rWx7xoWlEhEIT0hsZTCqUmnaV_U,11564
|
|
9
|
+
lmnr/opentelemetry_lib/litellm/__init__.py,sha256=92ncG4caRessW61fuo0Yn3fnSDXsdT1pS39097QVS1g,29432
|
|
10
|
+
lmnr/opentelemetry_lib/litellm/utils.py,sha256=8clVPSWzJ9CMEs8KbKFLFQuDfg9WsIJZosTojMmcLXg,3785
|
|
11
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/anthropic/__init__.py,sha256=iXsaJVziNw0ZYBiryvWUIpWjdM82e2aKO0GMO93SklE,26461
|
|
12
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/anthropic/config.py,sha256=lykZuCG5t-XcfNGRun54swtu-l1jUU6MswGZbWOGOSw,369
|
|
13
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/anthropic/event_emitter.py,sha256=gSs-ocWgRBIRPU3XcHF1YYYVlfnuxblN2BdMbd-3Vyo,6831
|
|
14
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/anthropic/event_models.py,sha256=PCfCGxrrArwZqR-4wFcXrhwQq0sBMAxmSrpC4PUMtaM,876
|
|
15
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/anthropic/span_utils.py,sha256=2mSSMzqxMHlXoesULT1tZu9kH42T_jl9nFB_VB39LZA,15367
|
|
16
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/anthropic/streaming.py,sha256=3zansJfYPivEhnPnDR2-Kgv2rxIC3WMfPx4jeSKbBeU,14272
|
|
17
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/anthropic/utils.py,sha256=wAbU7HjwB4e4HsY02JR37idsOb-WwkBNxKvckiI-hgk,10428
|
|
18
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/anthropic/version.py,sha256=WqzeTKVe9Q7QeiOa2KhoieBiGxzHK-Gb2TvnyeIJEKk,23
|
|
19
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/claude_agent/__init__.py,sha256=9HNfxhBdhbxSzIiIaFQFngZ98ykPCwOyD08jqJ61j1s,14594
|
|
20
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/claude_agent/proxy.py,sha256=yDbJ2F5MiFJSaQlMga8UUbIKAj5KyYs0vMae_0gAeVs,4100
|
|
21
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/cua_agent/__init__.py,sha256=DI0lMfaYDVCnwOhnzLdXF8WFYeM4I3bERfdOUlkKOro,3436
|
|
22
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/cua_computer/__init__.py,sha256=GQCSz8aZNzLmjgVfV1GzgcB5csFAsiY1SqBNZCchcMI,14992
|
|
23
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/cua_computer/utils.py,sha256=GQkNTZoFEWRfZhEuvm8FqZk5BbEdiuMGDastzEwaX7I,329
|
|
24
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/google_genai/__init__.py,sha256=wFfCYb6aptGs2TaVuIsoUJNBurhov4GBIlJOJBP1MlI,20672
|
|
25
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/google_genai/config.py,sha256=25zevJ7g3MtJP_5gju3jBH7-wg7SbDkktysuUO29ksI,245
|
|
26
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/google_genai/schema_utils.py,sha256=sQYZ525Yk_i4kfklMdKdz2ZR6Pmn3L-Bw_NTQc4xH24,753
|
|
27
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/google_genai/utils.py,sha256=rGYiCNM2y59esIY4nNd9c-GlqLzCLOj__M0SqCi05c0,11092
|
|
28
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/groq/__init__.py,sha256=HphGdxFAXk_4zNC1PAAuemdsWBYW7wFei2YGvXBXR4s,14986
|
|
29
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/groq/config.py,sha256=KdVX2d7lY1ToljS9w_R5XzRu5nu_7FYYS0-zlORafgM,203
|
|
30
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/groq/event_emitter.py,sha256=HwfXi_NggylRxwj8s3N3GOUNOc4Fvritv1foGLSHNwM,4481
|
|
31
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/groq/event_models.py,sha256=PCfCGxrrArwZqR-4wFcXrhwQq0sBMAxmSrpC4PUMtaM,876
|
|
32
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/groq/span_utils.py,sha256=ehzQNTn_LJ5RFKJkg9xQBmzV8bcoPlhEMd0DaUnh8xs,7461
|
|
33
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/groq/utils.py,sha256=E58IWjN64yH2iCK7vSQAv8AIxNanBqsxnlIr72uR5VI,2360
|
|
34
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/groq/version.py,sha256=WqzeTKVe9Q7QeiOa2KhoieBiGxzHK-Gb2TvnyeIJEKk,23
|
|
35
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/kernel/__init__.py,sha256=PYRxQfRvJQfIMGkdQfte3WWySoky07Pt0rVUJHo3F2g,11922
|
|
36
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/kernel/utils.py,sha256=tuWx00KjhhllfsEp_xEoZAT77WJ2Ere5tIWnYnnQeeg,1376
|
|
37
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/langgraph/__init__.py,sha256=t3pwdxdBuVAGyyfX-fwm5LebHxDKJLk6MWCkWMM5ep0,3313
|
|
38
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/langgraph/utils.py,sha256=nf9sJZXnnts4gYZortEiDvwYjYqYJZTAT0zutuP_R6Y,1512
|
|
39
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/openai/__init__.py,sha256=i5HcFq-Sfu51uWnAmAxgZoCzR6h_hTO8D0oJLl7G5ck,2071
|
|
40
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/openai/shared/__init__.py,sha256=zG4_8fFSlWPrfUM2LHVOHXCD0Wu01qAAxJmLJHRapL8,15840
|
|
41
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/openai/shared/chat_wrappers.py,sha256=r-7Lv2KLYO1ya_j16MSjIepYl3nhPOu3OVeDixuC1VQ,39468
|
|
42
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/openai/shared/completion_wrappers.py,sha256=OkXAfZ0PN7r0CaSOKhtXfygEHGI8QfWa2hyHuUKFrjs,9537
|
|
43
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/openai/shared/config.py,sha256=gBbkrwKRp3SEzojX0coGFGsSKa4OCg9G4EL691tFao8,507
|
|
44
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/openai/shared/embeddings_wrappers.py,sha256=Mk7ur43YYvScFbtykNQU53rVHN9TLCz9dDWHg832VKU,9330
|
|
45
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/openai/shared/event_emitter.py,sha256=nJZFW1yiBk3TqftXDXixTrvfPQL44zJV7p4wHDEzbJ4,3043
|
|
46
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/openai/shared/event_models.py,sha256=PCfCGxrrArwZqR-4wFcXrhwQq0sBMAxmSrpC4PUMtaM,876
|
|
47
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/openai/shared/image_gen_wrappers.py,sha256=llCg5K0tO_sqByWQ2hibz0-AesoHCUWvJqn5uZ13m3c,2021
|
|
48
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/openai/utils.py,sha256=e19r7Y_di4zwANOW2wjId0Qco4ME3aeyWbfScXjVSRg,5030
|
|
49
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/openai/v0/__init__.py,sha256=f0NCHgUr2PZNXVsDFwo7cYfCzgODYvoVtdHQxDvBpA0,6143
|
|
50
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/openai/v1/__init__.py,sha256=e9v2kayJ77Qq3mhrfb5pvROahPSEgqATt7aNO6pbnJg,13527
|
|
51
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/openai/v1/assistant_wrappers.py,sha256=VYA2xzRVmzUmZHwbGM-5hmmej7MihVr3LqBUwuRY9yE,10404
|
|
52
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/openai/v1/event_handler_wrapper.py,sha256=SAnN4APliSgigos3OqPkOorbruT_RD8ZhAEAP0PBXoo,4366
|
|
53
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/openai/v1/responses_wrappers.py,sha256=z5AH_R5JJ1pvSdCu09nA26QfR96sl2m-wIgI4rxu9Y8,30348
|
|
54
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/openai/version.py,sha256=TzmqqRPz5JsMF0vCMChofQC_r_x0W9P-JB4K5rRCvtE,24
|
|
55
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/openhands_ai/__init__.py,sha256=NId0WGYyLRc_f-tHDqPBm3FKoz8LNOL24Uh4i-cweMU,13603
|
|
56
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/opentelemetry/__init__.py,sha256=H4bN9zji9oWGsKRWm7HkDt3dhcUp9RHvSZRd23th-rU,2648
|
|
57
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/skyvern/__init__.py,sha256=Ccev5um7hedTKVIsv4h1qrMurPAysxu--u4Hkf71Vuk,6129
|
|
58
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/threading/__init__.py,sha256=79s3cqLNqgZ3NyXoPQ-ENcIY_0MPDAOw8WIFZmlAw6U,6820
|
|
59
|
+
lmnr/opentelemetry_lib/tracing/__init__.py,sha256=2iZkFGPj59Wd9zuLyDjsSrjEf-xsZwgXZetX_3yeZMg,10736
|
|
60
|
+
lmnr/opentelemetry_lib/tracing/_instrument_initializers.py,sha256=2lBvKcIMzRT3FRTuzwsCVBSo6usL7kj2ynmDTfbLneI,18083
|
|
61
|
+
lmnr/opentelemetry_lib/tracing/attributes.py,sha256=Fucf9yzfos7RMNDu1X1KGXaVTdGQAIW_i5qhdlno9Yo,1675
|
|
62
|
+
lmnr/opentelemetry_lib/tracing/context.py,sha256=uZA7Ka3L-2jvzVGB1czX0VW9DUpFSBhzhhnoA2MuG8Q,6539
|
|
63
|
+
lmnr/opentelemetry_lib/tracing/exporter.py,sha256=toqDfFlh9kk_07DL8dOe9pEhmBq2g10bCgRgoYx8b40,5819
|
|
64
|
+
lmnr/opentelemetry_lib/tracing/instruments.py,sha256=ohdN8lAvxPrv8vCguwU0PGAfDkjRuamKzuMPYeSrx9M,6158
|
|
65
|
+
lmnr/opentelemetry_lib/tracing/processor.py,sha256=enXQgCXG93w0se5mBUdDBLnPSiF44z95INZg4tqBksw,7241
|
|
66
|
+
lmnr/opentelemetry_lib/tracing/span.py,sha256=9k78ezdA9QnKjTx6yFxebzcCcYxJdJ-cLf997A0e-9w,14248
|
|
67
|
+
lmnr/opentelemetry_lib/tracing/tracer.py,sha256=R-Mb9Sr_wc5VlySjuPDPgUWQLaQIY6bgvnkWNS1UyrA,1763
|
|
68
|
+
lmnr/opentelemetry_lib/tracing/utils.py,sha256=d66bmFItL30B5hwyJUCbpbFhSrXqzLeO9NwixQdQJJE,2080
|
|
69
|
+
lmnr/opentelemetry_lib/utils/__init__.py,sha256=pNhf0G3vTd5ccoc03i1MXDbricSaiqCbi1DLWhSekK8,604
|
|
70
|
+
lmnr/opentelemetry_lib/utils/json_encoder.py,sha256=dK6b_axr70IYL7Vv-bu4wntvDDuyntoqsHaddqX7P58,463
|
|
71
|
+
lmnr/opentelemetry_lib/utils/package_check.py,sha256=-CdBhsloFcmWol-uBr-RPwu3yDVQdzmUnzfAO75dnKk,527
|
|
72
|
+
lmnr/opentelemetry_lib/utils/wrappers.py,sha256=97ETSAnyxAiXanHmYf7lyxqtFy9EZ4RplCBaYL-ZTp8,330
|
|
73
|
+
lmnr/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
74
|
+
lmnr/sdk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
75
|
+
lmnr/sdk/browser/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
76
|
+
lmnr/sdk/browser/background_send_events.py,sha256=g15xh6mS7NeHHHvitFCq7God3exRZ_UDUDRFUJHUVCo,5679
|
|
77
|
+
lmnr/sdk/browser/browser_use_cdp_otel.py,sha256=TuDOa2C4sgyKhi1evOnyqZ2_CGfVScxERVKUqxKBE30,3379
|
|
78
|
+
lmnr/sdk/browser/browser_use_otel.py,sha256=qFZCxNs_jHVh874KEdo87vgXOzH5iYvwLFgE5r4PI68,5020
|
|
79
|
+
lmnr/sdk/browser/bubus_otel.py,sha256=kpkbpfa14qbhMatX33w4M0W1eYKs_bFDdUChYJrR-HY,2465
|
|
80
|
+
lmnr/sdk/browser/cdp_utils.py,sha256=lhGAskuz1LwO8adlpIQNYT8INU4QUbNA5mHVAgFSTso,18286
|
|
81
|
+
lmnr/sdk/browser/inject_script.js,sha256=CRBn07B3PA89M0lOeQ2_RLogD9YTrzA61izJarAbmn8,19454
|
|
82
|
+
lmnr/sdk/browser/patchright_otel.py,sha256=iePjwWsuirNT_dduwgh685ELx5eglHZl0-DiSWcVkNg,4816
|
|
83
|
+
lmnr/sdk/browser/playwright_otel.py,sha256=fcYAo_TCUfT6B2z76DdizkpqSndo-GI1diFcUdrUaWU,10452
|
|
84
|
+
lmnr/sdk/browser/pw_utils.py,sha256=Y-qOyrBsZJjzy7A5zOhIbL8APMNx_B48-WU9uyJ_sfs,12098
|
|
85
|
+
lmnr/sdk/browser/recorder/record.umd.min.cjs,sha256=8JwJBSwvxHTvsEBeY9jSbtIYS5lFE86K7gTv2si-FV0,181235
|
|
86
|
+
lmnr/sdk/browser/utils.py,sha256=b1lVxr1VWvI1kL9l2IbCiuE97MkN87mqZqY8z-p5Kxg,2371
|
|
87
|
+
lmnr/sdk/client/asynchronous/async_client.py,sha256=b5spEBqCt35zmj7OoY2QxLUowQRpEpcmpoWmak5l9gA,6166
|
|
88
|
+
lmnr/sdk/client/asynchronous/resources/__init__.py,sha256=53swlBqHXLMO_sbB16RFjeovMiVtVVTaSl6RworPcLE,377
|
|
89
|
+
lmnr/sdk/client/asynchronous/resources/base.py,sha256=aJ43Q1rltg23IQaI4eeaZKckxVTgDUbCJrChhQCUEoE,986
|
|
90
|
+
lmnr/sdk/client/asynchronous/resources/browser_events.py,sha256=dvTXWZ7lTAWSGYWFMBrcLpwzg5gzLrEeRF92P0q0x8o,1164
|
|
91
|
+
lmnr/sdk/client/asynchronous/resources/datasets.py,sha256=Uv6so4ZshLhyk7DaEeaB-xQbnPQ9p8ZN_ZQ6ygkJ56I,4611
|
|
92
|
+
lmnr/sdk/client/asynchronous/resources/evals.py,sha256=IH4-W8Idr1-B5SsbIaISEf1cYSeqRqTTpV5OMPWooTY,9306
|
|
93
|
+
lmnr/sdk/client/asynchronous/resources/evaluators.py,sha256=lkBG9RRuiQMvu3AbiD9POny5lq65_zaPhuj5Z98v7xA,2918
|
|
94
|
+
lmnr/sdk/client/asynchronous/resources/tags.py,sha256=FPwuOMri9v4SbcjcoIXXrQLY18Ggm8S1tbjjig7fc0g,2314
|
|
95
|
+
lmnr/sdk/client/synchronous/resources/__init__.py,sha256=Mma1x8GLltUhvoTMiJmZ5Pq9_QPcLSmJqZc4jOaMVt4,333
|
|
96
|
+
lmnr/sdk/client/synchronous/resources/base.py,sha256=ne1ZZ10UmNkMrECVvClcEJfcFJlSGvaXOC8K6mZTPdY,971
|
|
97
|
+
lmnr/sdk/client/synchronous/resources/browser_events.py,sha256=9rFYWZesXQomnFgbZ590tGFMTaNj0OAzT9RcFwD8q_Y,1135
|
|
98
|
+
lmnr/sdk/client/synchronous/resources/datasets.py,sha256=43tFQbQCMJBAlYvSJucnpPD2NsJt7nCwAIQirBUVRGk,4547
|
|
99
|
+
lmnr/sdk/client/synchronous/resources/evals.py,sha256=cwQ_31eKt1c4uwVBF5EvpF42D_shw6Y8ucfpbaiGUrw,9124
|
|
100
|
+
lmnr/sdk/client/synchronous/resources/evaluators.py,sha256=PNahfnqcwEQcLSC_bPRs43IBMcwwBT4s0STlZox19Jo,2879
|
|
101
|
+
lmnr/sdk/client/synchronous/resources/tags.py,sha256=Ej3uxDEoZiwhyydbLfahAjcvh1MVsL02gGVVOUwdS1s,2270
|
|
102
|
+
lmnr/sdk/client/synchronous/sync_client.py,sha256=o2mFYza5HUQbwO0JRrM1DVK30BbTTLXF9VDygjjSkoU,6449
|
|
103
|
+
lmnr/sdk/datasets/__init__.py,sha256=aqmwvGq-J02j5ap2zBUf0Lx26QUazlcTQx3_-sOIV38,2984
|
|
104
|
+
lmnr/sdk/datasets/file_utils.py,sha256=9XUXKfIjojIRujAvU8i2BpYufWd70JBdMzdcqGn3iNM,2864
|
|
105
|
+
lmnr/sdk/decorators.py,sha256=wtoehbzzJz5i5EvqmQMwQktrCB1z8G8LCsqrg-wKQKY,8312
|
|
106
|
+
lmnr/sdk/eval_control.py,sha256=KROUrDhcZTrptRZ-hxvr60_o_Gt_8u045jb4cBXcuoY,184
|
|
107
|
+
lmnr/sdk/evaluations.py,sha256=Q9iqh0y6mA3hKAw280ZQhR-9d_UP2tn0--OjGSGwwxI,25916
|
|
108
|
+
lmnr/sdk/laminar.py,sha256=jTwq6KscPFFj0ekdh4yDDx-pQZ-ryF7om4iohG4VVXI,53519
|
|
109
|
+
lmnr/sdk/log.py,sha256=zz8LT7ZaVXTcLR_zho2g4MY3Il2YCMdRtGBi1DkDWc4,2351
|
|
110
|
+
lmnr/sdk/types.py,sha256=VR2WQKQ7w6bQypQ7AsEJqbB382fMt7ZTth1EFN5lanY,11767
|
|
111
|
+
lmnr/sdk/utils.py,sha256=n0EKPOYTykIojM_lZgCVIFDOl8rtv5y2qv6v-ssECvs,7396
|
|
112
|
+
lmnr/version.py,sha256=T6nxY6iLfn8xwJs-8H8H2ORDMrAZmRvDHkvisT_oYF4,1322
|
|
113
|
+
lmnr-0.7.26.dist-info/WHEEL,sha256=KSLUh82mDPEPk0Bx0ScXlWL64bc8KmzIPNcpQZFV-6E,79
|
|
114
|
+
lmnr-0.7.26.dist-info/entry_points.txt,sha256=q980EbfdLXMpokHy2mZpurTjFKdHpYbs25-IjzA1ADw,39
|
|
115
|
+
lmnr-0.7.26.dist-info/METADATA,sha256=5LMgneNgQRpzWJHQMBUfsk1w8B5cRjqT3VuxZPkP5U4,14495
|
|
116
|
+
lmnr-0.7.26.dist-info/RECORD,,
|
lmnr/cli.py
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
from argparse import ArgumentParser
|
|
2
|
-
import asyncio
|
|
3
|
-
import importlib.util
|
|
4
|
-
import logging
|
|
5
|
-
import os
|
|
6
|
-
import re
|
|
7
|
-
import sys
|
|
8
|
-
|
|
9
|
-
from .sdk.eval_control import PREPARE_ONLY, EVALUATION_INSTANCE
|
|
10
|
-
from .sdk.log import ColorfulFormatter
|
|
11
|
-
|
|
12
|
-
LOG = logging.getLogger(__name__)
|
|
13
|
-
console_log_handler = logging.StreamHandler()
|
|
14
|
-
console_log_handler.setFormatter(ColorfulFormatter())
|
|
15
|
-
LOG.addHandler(console_log_handler)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
EVAL_DIR = "evals"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
async def run_evaluation(args):
|
|
22
|
-
sys.path.append(os.getcwd())
|
|
23
|
-
|
|
24
|
-
if args.file is None:
|
|
25
|
-
files = [
|
|
26
|
-
os.path.join(EVAL_DIR, f)
|
|
27
|
-
for f in os.listdir(EVAL_DIR)
|
|
28
|
-
if re.match(r".*_eval\.py$", f) or re.match(r"eval_.*\.py$", f)
|
|
29
|
-
]
|
|
30
|
-
if len(files) == 0:
|
|
31
|
-
LOG.error("No evaluation files found in evals directory")
|
|
32
|
-
return
|
|
33
|
-
files.sort()
|
|
34
|
-
LOG.info(f"Located {len(files)} evaluation files in {EVAL_DIR}")
|
|
35
|
-
|
|
36
|
-
else:
|
|
37
|
-
files = [args.file]
|
|
38
|
-
|
|
39
|
-
for file in files:
|
|
40
|
-
prep_token = PREPARE_ONLY.set(True)
|
|
41
|
-
LOG.info(f"Running evaluation from {file}")
|
|
42
|
-
try:
|
|
43
|
-
file = os.path.abspath(file)
|
|
44
|
-
name = "user_module" + file
|
|
45
|
-
|
|
46
|
-
spec = importlib.util.spec_from_file_location(name, file)
|
|
47
|
-
if spec is None or spec.loader is None:
|
|
48
|
-
LOG.error(f"Could not load module specification from {file}")
|
|
49
|
-
if args.fail_on_error:
|
|
50
|
-
return
|
|
51
|
-
continue
|
|
52
|
-
mod = importlib.util.module_from_spec(spec)
|
|
53
|
-
sys.modules[name] = mod
|
|
54
|
-
|
|
55
|
-
spec.loader.exec_module(mod)
|
|
56
|
-
evaluation = EVALUATION_INSTANCE.get()
|
|
57
|
-
if evaluation is None:
|
|
58
|
-
LOG.warning("Evaluation instance not found")
|
|
59
|
-
if args.fail_on_error:
|
|
60
|
-
return
|
|
61
|
-
continue
|
|
62
|
-
|
|
63
|
-
await evaluation.run()
|
|
64
|
-
finally:
|
|
65
|
-
PREPARE_ONLY.reset(prep_token)
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
def cli():
|
|
69
|
-
parser = ArgumentParser(
|
|
70
|
-
prog="lmnr",
|
|
71
|
-
description="CLI for Laminar. Call `lmnr [subcommand] --help` for more information on each subcommand.",
|
|
72
|
-
)
|
|
73
|
-
|
|
74
|
-
subparsers = parser.add_subparsers(title="subcommands", dest="subcommand")
|
|
75
|
-
|
|
76
|
-
parser_eval = subparsers.add_parser(
|
|
77
|
-
"eval",
|
|
78
|
-
description="Run an evaluation",
|
|
79
|
-
help="Run an evaluation",
|
|
80
|
-
)
|
|
81
|
-
parser_eval.add_argument(
|
|
82
|
-
"file",
|
|
83
|
-
nargs="?",
|
|
84
|
-
help="A file containing the evaluation to run."
|
|
85
|
-
+ "If no file name is provided, all evaluation files in the `evals` directory are run as long"
|
|
86
|
-
+ "as they match *_eval.py or eval_*.py",
|
|
87
|
-
default=None,
|
|
88
|
-
)
|
|
89
|
-
|
|
90
|
-
parser_eval.add_argument(
|
|
91
|
-
"--fail-on-error",
|
|
92
|
-
action="store_true",
|
|
93
|
-
default=False,
|
|
94
|
-
help="Fail on error",
|
|
95
|
-
)
|
|
96
|
-
|
|
97
|
-
parsed = parser.parse_args()
|
|
98
|
-
if parsed.subcommand == "eval":
|
|
99
|
-
asyncio.run(run_evaluation(parsed))
|
|
100
|
-
else:
|
|
101
|
-
parser.print_help()
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3.9.5
|