valor-lite 0.33.6__py3-none-any.whl → 0.33.7__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.
@@ -241,6 +241,8 @@ class Evaluator:
241
241
  Maximum number of annotation examples to return in ConfusionMatrix.
242
242
  filter_ : Filter, optional
243
243
  An optional filter object.
244
+ as_dict : bool, default=False
245
+ An option to return metrics as dictionaries.
244
246
 
245
247
  Returns
246
248
  -------
@@ -342,6 +342,7 @@ class Evaluator:
342
342
  score_thresholds: list[float] = [0.5],
343
343
  number_of_examples: int = 0,
344
344
  filter_: Filter | None = None,
345
+ as_dict: bool = False,
345
346
  ) -> dict[MetricType, list]:
346
347
  """
347
348
  Performs an evaluation and returns metrics.
@@ -358,6 +359,8 @@ class Evaluator:
358
359
  Maximum number of annotation examples to return in ConfusionMatrix.
359
360
  filter_ : Filter, optional
360
361
  An optional filter object.
362
+ as_dict : bool, default=False
363
+ An option to return metrics as dictionaries.
361
364
 
362
365
  Returns
363
366
  -------
@@ -559,6 +562,12 @@ class Evaluator:
559
562
  if metric not in metrics_to_return:
560
563
  del metrics[metric]
561
564
 
565
+ if as_dict:
566
+ return {
567
+ mtype: [metric.to_dict() for metric in mvalues]
568
+ for mtype, mvalues in metrics.items()
569
+ }
570
+
562
571
  return metrics
563
572
 
564
573
  def _unpack_confusion_matrix(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: valor-lite
3
- Version: 0.33.6
3
+ Version: 0.33.7
4
4
  Summary: Compute valor metrics directly in your client.
5
5
  License: MIT License
6
6
 
@@ -3,15 +3,15 @@ valor_lite/schemas.py,sha256=r4cC10w1xYsA785KmGE4ePeOX3wzEs846vT7QAiVg_I,293
3
3
  valor_lite/classification/__init__.py,sha256=2wmmziIzUATm7MbmAcPNLXrEX5l4oeD7XBwPd9bWM3Q,506
4
4
  valor_lite/classification/annotation.py,sha256=rMDTvPHdAlvJ6_M2kRrnJQnj1oqKe-lxbncWC7Q50RE,345
5
5
  valor_lite/classification/computation.py,sha256=pqAPX6zFlaWyYBnve4sdgJLba_m7smeaqZAsEBvi1no,12776
6
- valor_lite/classification/manager.py,sha256=qAEGBwb6_Kj2Q0-B3NnRiSfJvS_gBSDJYsT6r8X-g_o,27870
6
+ valor_lite/classification/manager.py,sha256=Tx6SpEBnV17V-rT6b4MG5jQN-fqG2dlau2-aBnzF_mI,27965
7
7
  valor_lite/classification/metric.py,sha256=00qmagf-zQXUZ1qJW_UmN1k35aaYK_7GEM292Tc_cBE,4256
8
8
  valor_lite/detection/__init__.py,sha256=PiKfemo8FkZRzBhPSjhil8ahGURLy0Vk_iV25CB4UBU,1139
9
9
  valor_lite/detection/annotation.py,sha256=BspLc3SjWXj6qYlGGpzDPHEZ8j7CiFzIL5cNlk0WCAM,2732
10
10
  valor_lite/detection/computation.py,sha256=HDFfPTFQN2obm-g570KKDf7SP9V-h09OyMtFEJXsoTA,26323
11
- valor_lite/detection/manager.py,sha256=dHDGNtYRd_u9iCOTrLpqssdHrepi2N3dlx415kaeCM4,52860
11
+ valor_lite/detection/manager.py,sha256=BnLqDGaP5h1aC5D_Vm6-oUYFlz-1yuQqlJAnQ1zztSI,53160
12
12
  valor_lite/detection/metric.py,sha256=RYKN17nEFRIZIqmotQa6OyNnU0nkjXyfFIclX_5hGpY,9933
13
- valor_lite-0.33.6.dist-info/LICENSE,sha256=M0L53VuwfEEqezhHb7NPeYcO_glw7-k4DMLZQ3eRN64,1068
14
- valor_lite-0.33.6.dist-info/METADATA,sha256=pdZDGSu9gKinRjZo9G-qFmYVLwBw8mqVb0gs6IJVmZE,1865
15
- valor_lite-0.33.6.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
16
- valor_lite-0.33.6.dist-info/top_level.txt,sha256=9ujykxSwpl2Hu0_R95UQTR_l07k9UUTSdrpiqmq6zc4,11
17
- valor_lite-0.33.6.dist-info/RECORD,,
13
+ valor_lite-0.33.7.dist-info/LICENSE,sha256=M0L53VuwfEEqezhHb7NPeYcO_glw7-k4DMLZQ3eRN64,1068
14
+ valor_lite-0.33.7.dist-info/METADATA,sha256=EyxuCPqIDbQa4PAQ0utdpb0TVmZUn8TfwSTHnvoKXBc,1865
15
+ valor_lite-0.33.7.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
16
+ valor_lite-0.33.7.dist-info/top_level.txt,sha256=9ujykxSwpl2Hu0_R95UQTR_l07k9UUTSdrpiqmq6zc4,11
17
+ valor_lite-0.33.7.dist-info/RECORD,,