Skip to content

Commit

Permalink
fixes #51: Add todo
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxence Guindon committed Apr 8, 2024
1 parent f8e9ea2 commit 342aba5
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 50 deletions.
Empty file removed TESTING.MD
Empty file.
2 changes: 1 addition & 1 deletion model/seed_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ async def request_inference_from_seed_detector(model: namedtuple, previous_resul

result = response.read()
result_object = json.loads(result.decode("utf8"))
print(json.dumps(result_object[0].get("boxes"), indent=4)) # Transform into logging
print(json.dumps(result_object[0].get("boxes"), indent=4)) #TODO Transform into logging

return {
"result_json": result_object,
Expand Down
2 changes: 1 addition & 1 deletion model/six_seeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ async def request_inference_from_nachet_6seeds(model: namedtuple, previous_resul
result = response.read()
result_object = json.loads(result.decode("utf8"))

print(json.dumps(result_object[0].get("boxes"), indent=4)) # Transform into logging
print(json.dumps(result_object[0].get("boxes"), indent=4)) #TODO Transform into logging

return result_object

Expand Down
2 changes: 1 addition & 1 deletion model/swin.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ async def request_inference_from_swin(model: namedtuple, previous_result: list[b
result = response.read()
results.append(json.loads(result.decode("utf8")))

print(json.dumps(results, indent=4)) # Transform into logging
print(json.dumps(results, indent=4)) #TODO Transform into logging

return process_swin_result(previous_result.get("result_json"), results)
except HTTPError as e:
Expand Down
34 changes: 0 additions & 34 deletions pipelines_version_insertion.py

This file was deleted.

13 changes: 0 additions & 13 deletions tests/test_azure_storage_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,19 +182,6 @@ def test_get_pipeline_info_successful(self, MockFromConnectionString,):

self.assertEqual(result, json.loads(mock_blob_content))

@patch("azure.storage.blob.BlobServiceClient.from_connection_string")
def test_get_pipeline_info_wrong_connection_string(self, MockFromConnectionString):

pipeline_version = "v1"

MockFromConnectionString.side_effect = (
ValueError("connection string is empty or not conform")
)

with self.assertRaises(PipelineNotFoundError) as context:
asyncio.run(get_pipeline_info("wrong_connection_string", "test_blob", pipeline_version))

print(str(context.exception) == f"This version {pipeline_version} was not found")

@patch("azure.storage.blob.BlobServiceClient.from_connection_string")
def test_get_pipeline_info_unsuccessful(self, MockFromConnectionString):
Expand Down

0 comments on commit 342aba5

Please sign in to comment.