valor-lite 0.33.2__tar.gz → 0.33.3__tar.gz
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.
- {valor_lite-0.33.2 → valor_lite-0.33.3}/PKG-INFO +1 -1
- {valor_lite-0.33.2 → valor_lite-0.33.3}/benchmarks/benchmark_objdet.py +37 -13
- {valor_lite-0.33.2 → valor_lite-0.33.3}/tests/detection/test_dataloader.py +1 -1
- {valor_lite-0.33.2 → valor_lite-0.33.3}/tests/detection/test_detailed_counts.py +377 -538
- {valor_lite-0.33.2 → valor_lite-0.33.3}/tests/detection/test_evaluator.py +22 -0
- {valor_lite-0.33.2 → valor_lite-0.33.3}/tests/detection/test_schemas.py +3 -2
- {valor_lite-0.33.2 → valor_lite-0.33.3}/valor_lite/detection/annotation.py +14 -2
- {valor_lite-0.33.2 → valor_lite-0.33.3}/valor_lite/detection/computation.py +88 -64
- {valor_lite-0.33.2 → valor_lite-0.33.3}/valor_lite/detection/manager.py +286 -234
- {valor_lite-0.33.2 → valor_lite-0.33.3}/valor_lite/detection/metric.py +32 -7
- {valor_lite-0.33.2 → valor_lite-0.33.3}/valor_lite.egg-info/PKG-INFO +1 -1
- {valor_lite-0.33.2 → valor_lite-0.33.3}/LICENSE +0 -0
- {valor_lite-0.33.2 → valor_lite-0.33.3}/README.md +0 -0
- {valor_lite-0.33.2 → valor_lite-0.33.3}/benchmarks/.gitignore +0 -0
- {valor_lite-0.33.2 → valor_lite-0.33.3}/examples/.gitignore +0 -0
- {valor_lite-0.33.2 → valor_lite-0.33.3}/examples/coco-yolo.ipynb +0 -0
- {valor_lite-0.33.2 → valor_lite-0.33.3}/pyproject.toml +0 -0
- {valor_lite-0.33.2 → valor_lite-0.33.3}/setup.cfg +0 -0
- {valor_lite-0.33.2 → valor_lite-0.33.3}/tests/detection/__init__.py +0 -0
- {valor_lite-0.33.2 → valor_lite-0.33.3}/tests/detection/conftest.py +0 -0
- {valor_lite-0.33.2 → valor_lite-0.33.3}/tests/detection/test_average_precision.py +0 -0
- {valor_lite-0.33.2 → valor_lite-0.33.3}/tests/detection/test_average_recall.py +0 -0
- {valor_lite-0.33.2 → valor_lite-0.33.3}/tests/detection/test_counts.py +0 -0
- {valor_lite-0.33.2 → valor_lite-0.33.3}/tests/detection/test_filtering.py +0 -0
- {valor_lite-0.33.2 → valor_lite-0.33.3}/tests/detection/test_iou.py +0 -0
- {valor_lite-0.33.2 → valor_lite-0.33.3}/tests/detection/test_pr_curve.py +0 -0
- {valor_lite-0.33.2 → valor_lite-0.33.3}/tests/detection/test_precision.py +0 -0
- {valor_lite-0.33.2 → valor_lite-0.33.3}/tests/detection/test_recall.py +0 -0
- {valor_lite-0.33.2 → valor_lite-0.33.3}/tests/detection/test_stability.py +0 -0
- {valor_lite-0.33.2 → valor_lite-0.33.3}/valor_lite/__init__.py +0 -0
- {valor_lite-0.33.2 → valor_lite-0.33.3}/valor_lite/detection/__init__.py +0 -0
- {valor_lite-0.33.2 → valor_lite-0.33.3}/valor_lite/schemas.py +0 -0
- {valor_lite-0.33.2 → valor_lite-0.33.3}/valor_lite.egg-info/SOURCES.txt +0 -0
- {valor_lite-0.33.2 → valor_lite-0.33.3}/valor_lite.egg-info/dependency_links.txt +0 -0
- {valor_lite-0.33.2 → valor_lite-0.33.3}/valor_lite.egg-info/requires.txt +0 -0
- {valor_lite-0.33.2 → valor_lite-0.33.3}/valor_lite.egg-info/top_level.txt +0 -0
|
@@ -8,7 +8,7 @@ from time import time
|
|
|
8
8
|
|
|
9
9
|
import requests
|
|
10
10
|
from tqdm import tqdm
|
|
11
|
-
from valor_lite.detection import DataLoader
|
|
11
|
+
from valor_lite.detection import DataLoader, MetricType
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
class AnnotationType(str, Enum):
|
|
@@ -258,24 +258,48 @@ def run_benchmarking_analysis(
|
|
|
258
258
|
f"Base precomputation timed out with limit of {limit}."
|
|
259
259
|
)
|
|
260
260
|
|
|
261
|
-
#
|
|
262
|
-
detailed_counts_time_no_samples, _ = time_it(
|
|
263
|
-
evaluator.compute_detailed_counts
|
|
264
|
-
)()
|
|
265
|
-
|
|
266
|
-
# test detailed counts with 3 samples
|
|
267
|
-
detailed_counts_time_three_samples, _ = time_it(
|
|
268
|
-
evaluator.compute_detailed_counts
|
|
269
|
-
)(n_samples=3)
|
|
270
|
-
|
|
271
|
-
# evaluate
|
|
261
|
+
# evaluate - base metrics only
|
|
272
262
|
eval_time, metrics = time_it(evaluator.evaluate)()
|
|
273
|
-
# print(metrics)
|
|
274
263
|
if eval_time > evaluation_timeout and evaluation_timeout != -1:
|
|
275
264
|
raise TimeoutError(
|
|
276
265
|
f"Base evaluation timed out with {evaluator.n_datums} datums."
|
|
277
266
|
)
|
|
278
267
|
|
|
268
|
+
# evaluate - base metrics + detailed counts with no samples
|
|
269
|
+
detailed_counts_time_no_samples, metrics = time_it(
|
|
270
|
+
evaluator.evaluate
|
|
271
|
+
)(
|
|
272
|
+
[
|
|
273
|
+
MetricType.DetailedCounts,
|
|
274
|
+
*MetricType.base_metrics(),
|
|
275
|
+
]
|
|
276
|
+
)
|
|
277
|
+
if (
|
|
278
|
+
detailed_counts_time_no_samples > evaluation_timeout
|
|
279
|
+
and evaluation_timeout != -1
|
|
280
|
+
):
|
|
281
|
+
raise TimeoutError(
|
|
282
|
+
f"Detailed evaluation w/ no samples timed out with {evaluator.n_datums} datums."
|
|
283
|
+
)
|
|
284
|
+
|
|
285
|
+
# evaluate - base metrics + detailed counts with 3 samples
|
|
286
|
+
detailed_counts_time_three_samples, metrics = time_it(
|
|
287
|
+
evaluator.evaluate
|
|
288
|
+
)(
|
|
289
|
+
[
|
|
290
|
+
MetricType.DetailedCounts,
|
|
291
|
+
*MetricType.base_metrics(),
|
|
292
|
+
],
|
|
293
|
+
number_of_examples=3,
|
|
294
|
+
)
|
|
295
|
+
if (
|
|
296
|
+
detailed_counts_time_three_samples > evaluation_timeout
|
|
297
|
+
and evaluation_timeout != -1
|
|
298
|
+
):
|
|
299
|
+
raise TimeoutError(
|
|
300
|
+
f"Detailed w/ 3 samples evaluation timed out with {evaluator.n_datums} datums."
|
|
301
|
+
)
|
|
302
|
+
|
|
279
303
|
results.append(
|
|
280
304
|
Benchmark(
|
|
281
305
|
limit=limit,
|
|
@@ -22,7 +22,7 @@ def test_valor_integration():
|
|
|
22
22
|
loader.add_data_from_valor_dict([(gt, pd)])
|
|
23
23
|
|
|
24
24
|
assert len(loader.pairs) == 1
|
|
25
|
-
assert loader.pairs[0].shape == (
|
|
25
|
+
assert loader.pairs[0].shape == (71, 7)
|
|
26
26
|
|
|
27
27
|
assert set(loader._evaluator.label_key_to_index.keys()) == {
|
|
28
28
|
"iscrowd",
|