Skip to content

Commit 4d3983f

Browse files
committed
add logging
1 parent 5cafd8e commit 4d3983f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

bioimageio/core/_resource_tests.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from typing import Dict, Hashable, List, Literal, Optional, Set, Tuple, Union
44

55
import numpy as np
6+
from loguru import logger
67

78
from bioimageio.core.sample import Sample
89
from bioimageio.spec import (
@@ -117,6 +118,8 @@ def _test_model_inference(
117118
devices: Optional[List[str]],
118119
decimal: int,
119120
) -> None:
121+
test_name = "Reproduce test outputs from test inputs"
122+
logger.info("starting '{}'", test_name)
120123
error: Optional[str] = None
121124
tb: List[str] = []
122125
try:
@@ -150,7 +153,7 @@ def _test_model_inference(
150153

151154
model.validation_summary.add_detail(
152155
ValidationDetail(
153-
name="Reproduce test outputs from test inputs",
156+
name=test_name,
154157
status="passed" if error is None else "failed",
155158
errors=(
156159
[]
@@ -186,6 +189,10 @@ def _test_model_inference_parametrized(
186189
if not test_cases:
187190
return
188191

192+
logger.info(
193+
"Testing inference with {} different input tensor sizes", len(test_cases)
194+
)
195+
189196
if not any(
190197
isinstance(a.size, v0_5.ParameterizedSize)
191198
for ipt in model.inputs

0 commit comments

Comments
 (0)