-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Code-ReviewIssue is a result of code reviewIssue is a result of code reviewbugSomething isn't workingSomething isn't working
Description
In the example below, we aren't handling the failure scenario for remote API calls (which can fail). Need to provide explicit handling of these cases - should likely extract a unit-of-work pattern here to help with testing.
CustomVisionParallelScoring/src/ModelScoring.py
Lines 49 to 59 in b597ce2
| response = await httpclient.AsyncHTTPClient().fetch( | |
| method="POST", | |
| body=test_data.read(), | |
| request=apiUrl, | |
| headers={ | |
| "Prediction-Key": self.predictionKey, | |
| "Content-Type": "application/octet-stream" | |
| }, | |
| raise_error=False | |
| ) | |
| results = json.loads(response.body.decode()) |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Code-ReviewIssue is a result of code reviewIssue is a result of code reviewbugSomething isn't workingSomething isn't working