From 6ec00e8a8801a96fa1ff933b90a0a652afff9b49 Mon Sep 17 00:00:00 2001 From: Nils Mechtel Date: Thu, 19 Dec 2024 02:06:54 +0100 Subject: [PATCH] update test_model function --- bioimageio_colab/register_sam_service.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bioimageio_colab/register_sam_service.py b/bioimageio_colab/register_sam_service.py index d92c6ed..b101831 100644 --- a/bioimageio_colab/register_sam_service.py +++ b/bioimageio_colab/register_sam_service.py @@ -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"}