Skip to content

Commit

Permalink
update test_model function
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsmechtel committed Dec 19, 2024
1 parent 1590d72 commit 6ec00e8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions bioimageio_colab/register_sam_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,12 @@ async def test_model(handles: dict, model_name: str, context: dict = None) -> di
logger.info(f"User '{user_id}' - Test run for model '{model_name}'...")

image = np.random.rand(1024, 1024)
result = await handles[model_name].remote(image)
result = compute_image_embedding(handles, image, model_name, context)

assert "features" in result
assert "input_size" in result

embedding = result["features"]
assert isinstance(embedding, np.ndarray)
assert isinstance(result["features"], np.ndarray)
assert result["features"] is not None

return {"status": "ok"}

Expand Down

0 comments on commit 6ec00e8

Please sign in to comment.