Skip to content

Commit 63e5c58

Browse files
committed
fix test run logging
1 parent 459c856 commit 63e5c58

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bioimageio_colab/register_sam_service.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,9 @@ def test_model(cache_dir: str, model_name: str, context: dict = None) -> dict:
156156
"""
157157
Test the segmentation service.
158158
"""
159-
user_id = context["user"] if context else {"id": "anonymous"}
159+
user_id = context["user"].get("id") if context else "anonymous"
160160
logger.info(f"User '{user_id}' - Test run for model '{model_name}'...")
161+
161162
image = np.random.rand(1024, 1024)
162163
embedding = compute_image_embedding(
163164
cache_dir=cache_dir,

0 commit comments

Comments
 (0)