valor-lite 0.33.4__py3-none-any.whl → 0.33.6__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 valor-lite might be problematic. Click here for more details.

@@ -19,7 +19,7 @@ class MetricType(str, Enum):
19
19
  ARAveragedOverScores = "ARAveragedOverScores"
20
20
  mARAveragedOverScores = "mARAveragedOverScores"
21
21
  PrecisionRecallCurve = "PrecisionRecallCurve"
22
- DetailedCounts = "DetailedCounts"
22
+ ConfusionMatrix = "ConfusionMatrix"
23
23
 
24
24
  @classmethod
25
25
  def base_metrics(cls):
@@ -329,52 +329,78 @@ class PrecisionRecallCurve:
329
329
 
330
330
 
331
331
  @dataclass
332
- class DetailedCounts:
333
- tp: list[int]
334
- fp_misclassification: list[int]
335
- fp_hallucination: list[int]
336
- fn_misclassification: list[int]
337
- fn_missing_prediction: list[int]
338
- tp_examples: list[list[tuple[str, tuple[float, float, float, float]]]]
339
- fp_misclassification_examples: list[
340
- list[tuple[str, tuple[float, float, float, float]]]
332
+ class ConfusionMatrix:
333
+ confusion_matrix: dict[
334
+ str, # ground truth label value
335
+ dict[
336
+ str, # prediction label value
337
+ dict[
338
+ str, # either `count` or `examples`
339
+ int
340
+ | list[
341
+ dict[
342
+ str, # either `datum`, `groundtruth`, `prediction` or score
343
+ str # datum uid
344
+ | tuple[
345
+ float, float, float, float
346
+ ] # bounding box (xmin, xmax, ymin, ymax)
347
+ | float, # prediction score
348
+ ]
349
+ ],
350
+ ],
351
+ ],
341
352
  ]
342
- fp_hallucination_examples: list[
343
- list[tuple[str, tuple[float, float, float, float]]]
353
+ hallucinations: dict[
354
+ str, # prediction label value
355
+ dict[
356
+ str, # either `count` or `examples`
357
+ int
358
+ | list[
359
+ dict[
360
+ str, # either `datum`, `prediction` or score
361
+ str # datum uid
362
+ | float # prediction score
363
+ | tuple[
364
+ float, float, float, float
365
+ ], # bounding box (xmin, xmax, ymin, ymax)
366
+ ]
367
+ ],
368
+ ],
344
369
  ]
345
- fn_misclassification_examples: list[
346
- list[tuple[str, tuple[float, float, float, float]]]
370
+ missing_predictions: dict[
371
+ str, # ground truth label value
372
+ dict[
373
+ str, # either `count` or `examples`
374
+ int
375
+ | list[
376
+ dict[
377
+ str, # either `datum` or `groundtruth`
378
+ str # datum uid
379
+ | tuple[
380
+ float, float, float, float
381
+ ], # bounding box (xmin, xmax, ymin, ymax)
382
+ ]
383
+ ],
384
+ ],
347
385
  ]
348
- fn_missing_prediction_examples: list[
349
- list[tuple[str, tuple[float, float, float, float]]]
350
- ]
351
- score_thresholds: list[float]
386
+ score_threshold: float
352
387
  iou_threshold: float
353
- label: tuple[str, str]
388
+ label_key: str
389
+ number_of_examples: int
354
390
 
355
391
  @property
356
392
  def metric(self) -> Metric:
357
393
  return Metric(
358
394
  type=type(self).__name__,
359
395
  value={
360
- "tp": self.tp,
361
- "fp_misclassification": self.fp_misclassification,
362
- "fp_hallucination": self.fp_hallucination,
363
- "fn_misclassification": self.fn_misclassification,
364
- "fn_missing_prediction": self.fn_missing_prediction,
365
- "tp_examples": self.tp_examples,
366
- "fp_misclassification_examples": self.fp_misclassification_examples,
367
- "fp_hallucination_examples": self.fp_hallucination_examples,
368
- "fn_misclassification_examples": self.fn_misclassification_examples,
369
- "fn_missing_prediction_examples": self.fn_missing_prediction_examples,
396
+ "confusion_matrix": self.confusion_matrix,
397
+ "hallucinations": self.hallucinations,
398
+ "missing_predictions": self.missing_predictions,
370
399
  },
371
400
  parameters={
372
- "score_thresholds": self.score_thresholds,
401
+ "score_threshold": self.score_threshold,
373
402
  "iou_threshold": self.iou_threshold,
374
- "label": {
375
- "key": self.label[0],
376
- "value": self.label[1],
377
- },
403
+ "label_key": self.label_key,
378
404
  },
379
405
  )
380
406
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: valor-lite
3
- Version: 0.33.4
3
+ Version: 0.33.6
4
4
  Summary: Compute valor metrics directly in your client.
5
5
  License: MIT License
6
6
 
@@ -0,0 +1,17 @@
1
+ valor_lite/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ valor_lite/schemas.py,sha256=r4cC10w1xYsA785KmGE4ePeOX3wzEs846vT7QAiVg_I,293
3
+ valor_lite/classification/__init__.py,sha256=2wmmziIzUATm7MbmAcPNLXrEX5l4oeD7XBwPd9bWM3Q,506
4
+ valor_lite/classification/annotation.py,sha256=rMDTvPHdAlvJ6_M2kRrnJQnj1oqKe-lxbncWC7Q50RE,345
5
+ valor_lite/classification/computation.py,sha256=pqAPX6zFlaWyYBnve4sdgJLba_m7smeaqZAsEBvi1no,12776
6
+ valor_lite/classification/manager.py,sha256=qAEGBwb6_Kj2Q0-B3NnRiSfJvS_gBSDJYsT6r8X-g_o,27870
7
+ valor_lite/classification/metric.py,sha256=00qmagf-zQXUZ1qJW_UmN1k35aaYK_7GEM292Tc_cBE,4256
8
+ valor_lite/detection/__init__.py,sha256=PiKfemo8FkZRzBhPSjhil8ahGURLy0Vk_iV25CB4UBU,1139
9
+ valor_lite/detection/annotation.py,sha256=BspLc3SjWXj6qYlGGpzDPHEZ8j7CiFzIL5cNlk0WCAM,2732
10
+ valor_lite/detection/computation.py,sha256=HDFfPTFQN2obm-g570KKDf7SP9V-h09OyMtFEJXsoTA,26323
11
+ valor_lite/detection/manager.py,sha256=dHDGNtYRd_u9iCOTrLpqssdHrepi2N3dlx415kaeCM4,52860
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,,
@@ -1,12 +0,0 @@
1
- valor_lite/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- valor_lite/schemas.py,sha256=r4cC10w1xYsA785KmGE4ePeOX3wzEs846vT7QAiVg_I,293
3
- valor_lite/detection/__init__.py,sha256=taEB7NQBsyCSsMtvDA7E_FhDxMfJB1rax-Rl1ZtRMoE,1017
4
- valor_lite/detection/annotation.py,sha256=BspLc3SjWXj6qYlGGpzDPHEZ8j7CiFzIL5cNlk0WCAM,2732
5
- valor_lite/detection/computation.py,sha256=AsF9zb_c7XQ7z3LfOAtMPZDkmuCZmB8HeAMZJlCaO6U,24696
6
- valor_lite/detection/manager.py,sha256=vnouYdx_Ul9jz_pOYt8xfvdPrNy0S4SB838KXvtS1Bw,45301
7
- valor_lite/detection/metric.py,sha256=DLqpODJZOG7SCqt7TCgR4am68PQORRCIQW_SXiTb1IA,9473
8
- valor_lite-0.33.4.dist-info/LICENSE,sha256=M0L53VuwfEEqezhHb7NPeYcO_glw7-k4DMLZQ3eRN64,1068
9
- valor_lite-0.33.4.dist-info/METADATA,sha256=Eqb7KlTizDcjIV7eWM67zgdbbbVICGURdGrbben2NrI,1865
10
- valor_lite-0.33.4.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
11
- valor_lite-0.33.4.dist-info/top_level.txt,sha256=9ujykxSwpl2Hu0_R95UQTR_l07k9UUTSdrpiqmq6zc4,11
12
- valor_lite-0.33.4.dist-info/RECORD,,