Skip to content

Commit

Permalink
update service id
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsmechtel committed Oct 24, 2024
1 parent f69800b commit 5d73a6b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions bioimageio_colab/register_sam_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,9 @@ async def register_service(args: dict) -> None:
}
)
sid = service_info["id"]
client_service = sid.split("/")[1]
logger.info(f"Registered service with ID: {sid}")
logger.info(
f"Test the service here: {args.server_url}/{args.workspace_name}/services/{client_service}/hello"
f"Test the service here: {args.server_url}/{args.workspace_name}/services/{args.service_id}/hello"
)


Expand Down
2 changes: 1 addition & 1 deletion plugins/bioimageio-colab-annotator.imjoy.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
await api.alert("Please provide the annotation service ID in the configuration.");
return;
}
const samServiceId = "bioimageio-colab/*:microsam";
const samServiceId = "bioimageio-colab/microsam";

// Create and display the viewer window
const viewer = await api.createWindow({src: "https://kaibu.org/#/app", fullscreen: true});
Expand Down
5 changes: 2 additions & 3 deletions test/test_model_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


def test_service_available():
service_url = f"{SERVER_URL}/{WORKSPACE_NAME}/services/*:{SERVICE_ID}/hello"
service_url = f"{SERVER_URL}/{WORKSPACE_NAME}/services/{SERVICE_ID}/hello"
response = requests.get(service_url)
assert response.status_code == 200
assert response.json() == "Welcome to the Interactive Segmentation service!"
Expand All @@ -18,9 +18,8 @@ def test_get_service():
client = connect_to_server({"server_url": SERVER_URL, "method_timeout": 5})
assert client

sid = f"{WORKSPACE_NAME}/*:{SERVICE_ID}"
sid = f"{WORKSPACE_NAME}/{SERVICE_ID}"
segment_svc = client.get_service(sid, {"mode": "random"})
assert segment_svc.id == sid
assert segment_svc.config.workspace == WORKSPACE_NAME
assert segment_svc.get("segment")
assert segment_svc.get("clear_cache")
Expand Down

0 comments on commit 5d73a6b

Please sign in to comment.