lmnr 0.6.13__py3-none-any.whl → 0.6.14__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.
@@ -15,13 +15,14 @@ class AsyncEvals(BaseAsyncResource):
15
15
  """Resource for interacting with Laminar evaluations API."""
16
16
 
17
17
  async def init(
18
- self, name: str | None = None, group_name: str | None = None
18
+ self, name: str | None = None, group_name: str | None = None, metadata: dict[str, Any] | None = None
19
19
  ) -> InitEvaluationResponse:
20
20
  """Initialize a new evaluation.
21
21
 
22
22
  Args:
23
23
  name (str | None, optional): Name of the evaluation. Defaults to None.
24
24
  group_name (str | None, optional): Group name for the evaluation. Defaults to None.
25
+ metadata (dict[str, Any] | None, optional): Metadata to associate with. Defaults to None.
25
26
 
26
27
  Returns:
27
28
  InitEvaluationResponse: The response from the initialization request.
@@ -31,6 +32,7 @@ class AsyncEvals(BaseAsyncResource):
31
32
  json={
32
33
  "name": name,
33
34
  "groupName": group_name,
35
+ "metadata": metadata,
34
36
  },
35
37
  headers=self._headers(),
36
38
  )
@@ -45,6 +47,7 @@ class AsyncEvals(BaseAsyncResource):
45
47
  self,
46
48
  name: str | None = None,
47
49
  group_name: str | None = None,
50
+ metadata: dict[str, Any] | None = None,
48
51
  ) -> uuid.UUID:
49
52
  """
50
53
  Create a new evaluation and return its ID.
@@ -52,11 +55,12 @@ class AsyncEvals(BaseAsyncResource):
52
55
  Parameters:
53
56
  name (str | None, optional): Optional name of the evaluation.
54
57
  group_name (str | None, optional): An identifier to group evaluations.
55
-
58
+ metadata (dict[str, Any] | None, optional): Metadata to associate with. Defaults to None.
59
+
56
60
  Returns:
57
61
  uuid.UUID: The evaluation ID.
58
62
  """
59
- evaluation = await self.init(name=name, group_name=group_name)
63
+ evaluation = await self.init(name=name, group_name=group_name, metadata=metadata)
60
64
  return evaluation.id
61
65
 
62
66
  async def create_datapoint(
@@ -17,13 +17,14 @@ class Evals(BaseResource):
17
17
  """Resource for interacting with Laminar evaluations API."""
18
18
 
19
19
  def init(
20
- self, name: str | None = None, group_name: str | None = None
20
+ self, name: str | None = None, group_name: str | None = None, metadata: dict[str, Any] | None = None
21
21
  ) -> InitEvaluationResponse:
22
22
  """Initialize a new evaluation.
23
23
 
24
24
  Args:
25
25
  name (str | None, optional): Name of the evaluation. Defaults to None.
26
26
  group_name (str | None, optional): Group name for the evaluation. Defaults to None.
27
+ metadata (dict[str, Any] | None, optional): Metadata to associate with. Defaults to None.
27
28
 
28
29
  Returns:
29
30
  InitEvaluationResponse: The response from the initialization request.
@@ -33,6 +34,7 @@ class Evals(BaseResource):
33
34
  json={
34
35
  "name": name,
35
36
  "groupName": group_name,
37
+ "metadata": metadata,
36
38
  },
37
39
  headers=self._headers(),
38
40
  )
@@ -47,6 +49,7 @@ class Evals(BaseResource):
47
49
  self,
48
50
  name: str | None = None,
49
51
  group_name: str | None = None,
52
+ metadata: dict[str, Any] | None = None,
50
53
  ) -> uuid.UUID:
51
54
  """
52
55
  Create a new evaluation and return its ID.
@@ -54,11 +57,12 @@ class Evals(BaseResource):
54
57
  Parameters:
55
58
  name (str | None, optional): Optional name of the evaluation.
56
59
  group_name (str | None, optional): An identifier to group evaluations.
57
-
60
+ metadata (dict[str, Any] | None, optional): Metadata to associate with. Defaults to None.
61
+
58
62
  Returns:
59
63
  uuid.UUID: The evaluation ID.
60
64
  """
61
- evaluation = self.init(name=name, group_name=group_name)
65
+ evaluation = self.init(name=name, group_name=group_name, metadata=metadata)
62
66
  return evaluation.id
63
67
 
64
68
  def create_datapoint(
lmnr/sdk/evaluations.py CHANGED
@@ -104,6 +104,7 @@ class Evaluation:
104
104
  evaluators: dict[str, EvaluatorFunction | HumanEvaluator],
105
105
  name: str | None = None,
106
106
  group_name: str | None = None,
107
+ metadata: dict[str, Any] | None = None,
107
108
  concurrency_limit: int = DEFAULT_BATCH_SIZE,
108
109
  project_api_key: str | None = None,
109
110
  base_url: str | None = None,
@@ -143,6 +144,7 @@ class Evaluation:
143
144
  evaluations. Only evaluations within the same group_name can be\
144
145
  visually compared. If not provided, "default" is assigned.
145
146
  Defaults to None
147
+ metadata (dict[str, Any] | None): optional metadata to associate with\
146
148
  concurrency_limit (int, optional): The concurrency limit for\
147
149
  evaluation. This many data points will be evaluated in parallel\
148
150
  with a pool of workers.
@@ -192,6 +194,7 @@ class Evaluation:
192
194
  self.evaluators = evaluators
193
195
  self.group_name = group_name
194
196
  self.name = name
197
+ self.metadata = metadata
195
198
  self.concurrency_limit = concurrency_limit
196
199
  self.batch_size = concurrency_limit
197
200
  self._logger = get_default_logger(self.__class__.__name__)
@@ -242,7 +245,7 @@ class Evaluation:
242
245
  self.reporter.start(len(self.data))
243
246
  try:
244
247
  evaluation = await self.client.evals.init(
245
- name=self.name, group_name=self.group_name
248
+ name=self.name, group_name=self.group_name, metadata=self.metadata
246
249
  )
247
250
  result_datapoints = await self._evaluate_in_batches(evaluation.id)
248
251
 
@@ -409,6 +412,7 @@ def evaluate(
409
412
  evaluators: dict[str, EvaluatorFunction | HumanEvaluator],
410
413
  name: str | None = None,
411
414
  group_name: str | None = None,
415
+ metadata: dict[str, Any] | None = None,
412
416
  concurrency_limit: int = DEFAULT_BATCH_SIZE,
413
417
  project_api_key: str | None = None,
414
418
  base_url: str | None = None,
@@ -452,6 +456,7 @@ def evaluate(
452
456
  Only evaluations within the same group_name can be visually compared.\
453
457
  If not provided, set to "default".
454
458
  Defaults to None
459
+ metadata (dict[str, Any] | None, optional): Optional metadata to associate with\
455
460
  concurrency_limit (int, optional): The concurrency limit for evaluation.
456
461
  Defaults to DEFAULT_BATCH_SIZE.
457
462
  project_api_key (str | None, optional): The project API key.
@@ -478,6 +483,7 @@ def evaluate(
478
483
  executor=executor,
479
484
  evaluators=evaluators,
480
485
  group_name=group_name,
486
+ metadata=metadata,
481
487
  name=name,
482
488
  concurrency_limit=concurrency_limit,
483
489
  project_api_key=project_api_key,
lmnr/version.py CHANGED
@@ -3,7 +3,7 @@ import httpx
3
3
  from packaging import version
4
4
 
5
5
 
6
- __version__ = "0.6.13"
6
+ __version__ = "0.6.14"
7
7
  PYTHON_VERSION = f"{sys.version_info.major}.{sys.version_info.minor}"
8
8
 
9
9
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: lmnr
3
- Version: 0.6.13
3
+ Version: 0.6.14
4
4
  Summary: Python SDK for Laminar
5
5
  License: Apache-2.0
6
6
  Author: lmnr.ai
@@ -35,26 +35,26 @@ lmnr/sdk/client/asynchronous/resources/__init__.py,sha256=9fkjlVJS8zhnCTITjhow17
35
35
  lmnr/sdk/client/asynchronous/resources/agent.py,sha256=Ong3K2KRLN7agx1_-aZxMGcT_OGF3_ZGtFLm8aPMbYw,17788
36
36
  lmnr/sdk/client/asynchronous/resources/base.py,sha256=aJ43Q1rltg23IQaI4eeaZKckxVTgDUbCJrChhQCUEoE,986
37
37
  lmnr/sdk/client/asynchronous/resources/browser_events.py,sha256=T-DUbbAfMQ2VqiVfgVplxuTaJZuoNcC1O6RCxdfw7UQ,1163
38
- lmnr/sdk/client/asynchronous/resources/evals.py,sha256=dYFuHmXW_FFNsmKC7_NuhxowzCJVUrRmrxeAJ_7EzOA,5420
38
+ lmnr/sdk/client/asynchronous/resources/evals.py,sha256=jG-AlpFmV-8mlGOy0FhXldnO2tBWoEerzeY2X_CzIL0,5761
39
39
  lmnr/sdk/client/asynchronous/resources/tags.py,sha256=VbsBMp120d_8drGFr1Obp4xSRktzPC-3kOYcblZnvKA,2565
40
40
  lmnr/sdk/client/synchronous/resources/__init__.py,sha256=hDGyNARdG3J25lLAP8JnlER7r8JL-JQuPN1xdheiCw4,318
41
41
  lmnr/sdk/client/synchronous/resources/agent.py,sha256=mnTu6toN2LbgmEhQ-mdZ0CzNAnkrGiksrys0AyMwz2A,17809
42
42
  lmnr/sdk/client/synchronous/resources/base.py,sha256=ne1ZZ10UmNkMrECVvClcEJfcFJlSGvaXOC8K6mZTPdY,971
43
43
  lmnr/sdk/client/synchronous/resources/browser_events.py,sha256=9rFYWZesXQomnFgbZ590tGFMTaNj0OAzT9RcFwD8q_Y,1135
44
- lmnr/sdk/client/synchronous/resources/evals.py,sha256=odN9ZfZnUXKzFZJ6AQDrIjEljqnj8aQKP1ivY188WGo,6667
44
+ lmnr/sdk/client/synchronous/resources/evals.py,sha256=QV_v4jRRn4r_sk2FjvqdbAc1-Wa2GUl3qWrCzhbQZsA,7008
45
45
  lmnr/sdk/client/synchronous/resources/tags.py,sha256=cNMEzMDhlBNpI7J4x6xkFAANiNSq-Vuu_zi5NPk2kcA,2485
46
46
  lmnr/sdk/client/synchronous/sync_client.py,sha256=IIzj-mAwHHoRuUX9KkJtrzTGi5UOygbA8wiA9Aqzf2E,4907
47
47
  lmnr/sdk/datasets.py,sha256=P9hRxfl7-I6qhLFFGgU-r_I7RJfLtF6sL56g5fKIbAA,1708
48
48
  lmnr/sdk/decorators.py,sha256=1uu9xxBYgblFqlhQqH17cZYq7babAmB1lEtvBgTsP0E,4468
49
49
  lmnr/sdk/eval_control.py,sha256=KROUrDhcZTrptRZ-hxvr60_o_Gt_8u045jb4cBXcuoY,184
50
- lmnr/sdk/evaluations.py,sha256=fMUDueAgGv9fyTuX7n0DsS8lOzrbZNMgPorA037tgDU,21458
50
+ lmnr/sdk/evaluations.py,sha256=rUDGpI1eNKoz89mtgFFPIFXn6zYLggaXvWy4KKY2RiU,21806
51
51
  lmnr/sdk/laminar.py,sha256=oOVco_c9ZstT71HsquGsgbtFumXd2Ejz0rl_qpmMlTU,33996
52
52
  lmnr/sdk/log.py,sha256=nt_YMmPw1IRbGy0b7q4rTtP4Yo3pQfNxqJPXK3nDSNQ,2213
53
53
  lmnr/sdk/types.py,sha256=ZQp5SeYJNZsK3KrbSeXPY_xn6mGjW5mSw_i0Rd_Oa4k,12328
54
54
  lmnr/sdk/utils.py,sha256=yrcHIhoADf9lWH9qJWZMmkRWYvd0DuxPSLP3mY6YFw0,4327
55
- lmnr/version.py,sha256=9gMGnzWiCqbv_PzYX6c-jQFz17zO1xyIONO32wE9xfY,1322
56
- lmnr-0.6.13.dist-info/LICENSE,sha256=67b_wJHVV1CBaWkrKFWU1wyqTPSdzH77Ls-59631COg,10411
57
- lmnr-0.6.13.dist-info/METADATA,sha256=95yHwJlTi4CNL1ucZDk9ge2flO712qjpxikJ0jCkmiI,15186
58
- lmnr-0.6.13.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
59
- lmnr-0.6.13.dist-info/entry_points.txt,sha256=K1jE20ww4jzHNZLnsfWBvU3YKDGBgbOiYG5Y7ivQcq4,37
60
- lmnr-0.6.13.dist-info/RECORD,,
55
+ lmnr/version.py,sha256=R9BOGoH8CfmmKLkCU4zXkOvGWsR9Tz0zP4HbcoSRTAA,1322
56
+ lmnr-0.6.14.dist-info/LICENSE,sha256=67b_wJHVV1CBaWkrKFWU1wyqTPSdzH77Ls-59631COg,10411
57
+ lmnr-0.6.14.dist-info/METADATA,sha256=lrCS9CWz7RZEh0JdrfuBdO4J3W5sBw_l1ElZbxm1c7E,15186
58
+ lmnr-0.6.14.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
59
+ lmnr-0.6.14.dist-info/entry_points.txt,sha256=K1jE20ww4jzHNZLnsfWBvU3YKDGBgbOiYG5Y7ivQcq4,37
60
+ lmnr-0.6.14.dist-info/RECORD,,
File without changes
File without changes