lmnr 0.4.52__py3-none-any.whl → 0.4.54__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.
@@ -70,7 +70,7 @@ class TracerWrapper(object):
70
70
  headers: Dict[str, str] = {}
71
71
  __tracer_provider: TracerProvider = None
72
72
  __logger: logging.Logger = None
73
- __span_id_to_path: dict[int, str] = {}
73
+ __span_id_to_path: dict[int, list[str]] = {}
74
74
 
75
75
  def __new__(
76
76
  cls,
@@ -155,7 +155,7 @@ class TracerWrapper(object):
155
155
  parent_span_path = span_path_in_context or (
156
156
  self.__span_id_to_path.get(span.parent.span_id) if span.parent else None
157
157
  )
158
- span_path = f"{parent_span_path}.{span.name}" if parent_span_path else span.name
158
+ span_path = parent_span_path + [span.name] if parent_span_path else [span.name]
159
159
  span.set_attribute(SPAN_PATH, span_path)
160
160
  set_value("span_path", span_path, get_current())
161
161
  self.__span_id_to_path[span.get_span_context().span_id] = span_path
lmnr/sdk/evaluations.py CHANGED
@@ -29,9 +29,10 @@ from .utils import is_async
29
29
  DEFAULT_BATCH_SIZE = 5
30
30
 
31
31
 
32
- def get_evaluation_url(
33
- project_id: str, evaluation_id: str, base_url: str = "https://www.lmnr.ai"
34
- ):
32
+ def get_evaluation_url(project_id: str, evaluation_id: str, base_url: Optional[str] = None):
33
+ if not base_url:
34
+ base_url = "https://www.lmnr.ai"
35
+
35
36
  url = base_url
36
37
  if url.endswith("/"):
37
38
  url = url[:-1]
@@ -58,7 +59,7 @@ def get_average_scores(results: list[EvaluationResultDatapoint]) -> dict[str, Nu
58
59
 
59
60
 
60
61
  class EvaluationReporter:
61
- def __init__(self, base_url: str = "https://www.lmnr.ai"):
62
+ def __init__(self, base_url):
62
63
  self.base_url = base_url
63
64
 
64
65
  def start(self, length: int):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: lmnr
3
- Version: 0.4.52
3
+ Version: 0.4.54
4
4
  Summary: Python SDK for Laminar
5
5
  License: Apache-2.0
6
6
  Author: lmnr.ai
@@ -11,7 +11,7 @@ lmnr/openllmetry_sdk/tracing/__init__.py,sha256=xT73L1t2si2CM6QmMiTZ7zn-dKKYBLNr
11
11
  lmnr/openllmetry_sdk/tracing/attributes.py,sha256=B_4KVYWAUu-6DQmsm2eCJQcTxm8pG1EByCBK3uOPkuI,1293
12
12
  lmnr/openllmetry_sdk/tracing/content_allow_list.py,sha256=3feztm6PBWNelc8pAZUcQyEGyeSpNiVKjOaDk65l2ps,846
13
13
  lmnr/openllmetry_sdk/tracing/context_manager.py,sha256=rdSus-p-TaevQ8hIAhfbnZr5dTqRvACDkzXGDpflncY,306
14
- lmnr/openllmetry_sdk/tracing/tracing.py,sha256=5Ctw4-Nn1LMfE4ZTxxOv2sFXFlrBwPTywpOmEpgksXk,32355
14
+ lmnr/openllmetry_sdk/tracing/tracing.py,sha256=N5EeK4yoSa11CPh4J0OvHnDy8uxx018lzJ0FQLVapQ4,32360
15
15
  lmnr/openllmetry_sdk/utils/__init__.py,sha256=pNhf0G3vTd5ccoc03i1MXDbricSaiqCbi1DLWhSekK8,604
16
16
  lmnr/openllmetry_sdk/utils/in_memory_span_exporter.py,sha256=H_4TRaThMO1H6vUQ0OpQvzJk_fZH0OOsRAM1iZQXsR8,2112
17
17
  lmnr/openllmetry_sdk/utils/json_encoder.py,sha256=dK6b_axr70IYL7Vv-bu4wntvDDuyntoqsHaddqX7P58,463
@@ -21,13 +21,13 @@ lmnr/sdk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
21
  lmnr/sdk/datasets.py,sha256=hJcQcwTJbtA4COoVG3god4xll9TBSDMfvrhKmMfanjg,1567
22
22
  lmnr/sdk/decorators.py,sha256=ja2EUWUWvFOp28ER0k78PRuxNahwCVyH0TdM3U-xY7U,1856
23
23
  lmnr/sdk/eval_control.py,sha256=G6Fg3Xx_KWv72iBaWlNMdyRTF2bZFQnwJ68sJNSpIcY,177
24
- lmnr/sdk/evaluations.py,sha256=lSXSvvYNB5JsSGli_wV-W34LVzJkQOiK8DnvHv4eU5A,16323
24
+ lmnr/sdk/evaluations.py,sha256=dUIMEmKUzkOmHZ3nxlddk9kKm518C6xvElpgtNsql10,16344
25
25
  lmnr/sdk/laminar.py,sha256=611MLSJwGxVHd7LgW0kPCtwPB2rLlHE_BtVyVrIKFz0,31447
26
26
  lmnr/sdk/log.py,sha256=nt_YMmPw1IRbGy0b7q4rTtP4Yo3pQfNxqJPXK3nDSNQ,2213
27
27
  lmnr/sdk/types.py,sha256=FCNoFoa0ingOvpXGfbiETVsakYyq9Zpoc56MXJ1YDzQ,6390
28
28
  lmnr/sdk/utils.py,sha256=Uk8y15x-sd5tP2ERONahElLDJVEy_3dA_1_5g9A6auY,3358
29
- lmnr-0.4.52.dist-info/LICENSE,sha256=67b_wJHVV1CBaWkrKFWU1wyqTPSdzH77Ls-59631COg,10411
30
- lmnr-0.4.52.dist-info/METADATA,sha256=bohI8yDG-CtbaApF5U2-7buE5M0dtnsVR60pHY6KGrs,13829
31
- lmnr-0.4.52.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
32
- lmnr-0.4.52.dist-info/entry_points.txt,sha256=K1jE20ww4jzHNZLnsfWBvU3YKDGBgbOiYG5Y7ivQcq4,37
33
- lmnr-0.4.52.dist-info/RECORD,,
29
+ lmnr-0.4.54.dist-info/LICENSE,sha256=67b_wJHVV1CBaWkrKFWU1wyqTPSdzH77Ls-59631COg,10411
30
+ lmnr-0.4.54.dist-info/METADATA,sha256=ohFPnFyzy3ppgJdvvoz1ofQ6BZFZUsb9wBanIfzUNEc,13829
31
+ lmnr-0.4.54.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
32
+ lmnr-0.4.54.dist-info/entry_points.txt,sha256=K1jE20ww4jzHNZLnsfWBvU3YKDGBgbOiYG5Y7ivQcq4,37
33
+ lmnr-0.4.54.dist-info/RECORD,,
File without changes
File without changes