Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: Enable new model id's #886

Closed
wants to merge 14 commits into from
Prev Previous commit
Next Next commit
update tests
balthazur committed Dec 18, 2024
commit 40d937230dd7fbc3a3173f0cdf38e12bf71ff8b0
5 changes: 5 additions & 0 deletions tests/inference/unit_tests/core/registries/test_roboflow.py
Original file line number Diff line number Diff line change
@@ -259,6 +259,7 @@ def test_get_model_type_when_roboflow_api_is_called_for_specific_model(
model_id=model_id,
endpoint_type=ModelEndpointType.ORT,
device_id=GLOBAL_DEVICE_ID,
workspace_id="my_workspace",
)


@@ -297,6 +298,7 @@ def test_get_model_type_when_roboflow_api_is_called_for_specific_model_and_model
model_id="some/1",
endpoint_type=ModelEndpointType.ORT,
device_id=GLOBAL_DEVICE_ID,
workspace_id="my_workspace",
)


@@ -336,6 +338,7 @@ def test_get_model_type_when_roboflow_api_is_called_for_specific_model_and_model
model_id="some/1",
endpoint_type=ModelEndpointType.ORT,
device_id=GLOBAL_DEVICE_ID,
workspace_id="my_workspace",
)


@@ -371,6 +374,7 @@ def test_get_model_type_when_roboflow_api_is_called_for_specific_model_and_proje
model_id="some/1",
endpoint_type=ModelEndpointType.ORT,
device_id=GLOBAL_DEVICE_ID,
workspace_id="my_workspace",
)


@@ -411,6 +415,7 @@ def test_get_model_type_when_roboflow_api_is_called_for_specific_model_without_a
model_id="some/1",
endpoint_type=ModelEndpointType.ORT,
device_id=GLOBAL_DEVICE_ID,
workspace_id="my_workspace",
)

@mock.patch.object(roboflow, "determine_cache_paths")
5 changes: 5 additions & 0 deletions tests/inference/unit_tests/core/test_roboflow_api.py
Original file line number Diff line number Diff line change
@@ -549,6 +549,7 @@ def test_get_roboflow_model_data_when_connection_error_occurs(
model_id="coins_detection/1",
endpoint_type=ModelEndpointType.ORT,
device_id="some",
workspace_id="my_workspace",
)


@@ -566,6 +567,7 @@ def test_get_roboflow_model_data_when_wrong_api_key_used(requests_mock: Mocker)
model_id="coins_detection/1",
endpoint_type=ModelEndpointType.ORT,
device_id="some",
workspace_id="my_workspace",
)

# then
@@ -588,6 +590,7 @@ def test_get_roboflow_model_data_when_wrong_model_used(requests_mock: Mocker) ->
model_id="coins_detection/1",
endpoint_type=ModelEndpointType.ORT,
device_id="some",
workspace_id="my_workspace",
)

# then
@@ -610,6 +613,7 @@ def test_get_roboflow_model_data_when_http_error_occurs(requests_mock: Mocker) -
model_id="coins_detection/1",
endpoint_type=ModelEndpointType.ORT,
device_id="some",
workspace_id="my_workspace",
)

# then
@@ -634,6 +638,7 @@ def test_get_roboflow_model_data_when_response_parsing_error_occurs(
model_id="coins_detection/1",
endpoint_type=ModelEndpointType.ORT,
device_id="some",
workspace_id="my_workspace",
)

# then