-
-
Notifications
You must be signed in to change notification settings - Fork 211
[ENH] V1 → V2 API Migration - evaluations #1606
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
base: main
Are you sure you want to change the base?
Conversation
fkiraly
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 like circular imports
|
@geetu040 We have circular imports here cuz of importing Error message: |
geetu040
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.
Please update the listing functionality with the suggested approach in #1575 (comment). And also sync this PR with my base PR.
I don't really have an explanation for why this could be happening, can you try to sync with my branch and see if it persists and we can have a look, otherwise I am going to refactor the config part so it may automatically fix this. |
Updated, please check |
geetu040
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 overall, should be fine with few changes as suggested. And some comments are open for discussion.
| @abstractmethod | ||
| def get_users(self, uploader_ids: list[str]) -> dict: ... |
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.
I am a bit skeptical with this
- this is a different resource, it should not be coupled with
Evaluations - it raises the question of inter-resource communication. Can we do that without running into circular-imports? How do we do that, should we use
api_contextor rely to a utility function inusers/functions? - is this resource,
userused elsewhere in code? - is this type of inter-resource communication happening elsewhere in code?
|
|
||
|
|
||
| def _list_evaluations( # noqa: C901 | ||
| def _list_evaluations( |
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.
I suspect you didn't completely remove this and replace with api_context.backend.evaluations.list in partial because of the circular import error? As discussed in the standup, I think the api_context.backend.evaluations.list should return OpenMLEvaluation object, so best comply with both v1/v2 interface.
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.
please sync this with my pr, this file should not be changed
Depends on #1576
Related to #1575
Details
This PR implements
Evaluationsresource, and refactor its existing functions