-
Notifications
You must be signed in to change notification settings - Fork 47
[DAR-6195][external] Support Reports v3 in Darwin Py #1043
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
[DAR-6195][external] Support Reports v3 in Darwin Py #1043
Conversation
umbertoDifa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I've added a few discussion point we should discuss about
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
darwin/client.py:720
- The symbol 'urljoin' is used but not imported; add 'from urllib.parse import urljoin' at the top of the file.
raise JobPendingException(f"Polling for generated report results timed out, job status can be requested manually: {urljoin(self.url, job_status_url)}")
tests/darwin/client_test.py:826
- The exception 'NotFound' is used in the test but does not appear to be imported or defined; ensure it is imported from the appropriate module or replace it with the correct exception.
with pytest.raises(NotFound):
f1ebfd2 to
fbf580b
Compare
umbertoDifa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Looks good |
Problem
It is impossible to query V3 annotator reports using the SDK. Reports V1 can be queried, but are not created since 11/05/2024.
Solution
Add a new top-level command and an action for V3 annotator reports:
darwin report annotators.Instead of requesting an annotator report synchronously, start a report job, and poll for results with exponential backoff. For now, log the id of the created job and raise an error if the happy path fails.
Changelog
Added top-level
reportcommand, addedreport annotatorscommand to query V3 annotator reports