-
-
Notifications
You must be signed in to change notification settings - Fork 213
[ENH] V1 → V2 API Migration - core structure #1576
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
geetu040
wants to merge
22
commits into
openml:main
Choose a base branch
from
geetu040:migration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
0159f47
set up folder structure and base code
geetu040 58e9175
Merge branch 'main' into migration
fkiraly bdd65ff
Merge branch 'main' into migration
geetu040 52ef379
fix pre-commit
geetu040 5dfcbce
refactor
geetu040 2acbe99
implement cache_dir
geetu040 af99880
refactor
geetu040 74ab366
Merge branch 'main' into pr/1576
fkiraly 4c75e16
undo changes in tasks/functions.py
geetu040 5762185
Merge branch 'main' into migration
geetu040 7e9bc1f
Merge branch 'main' into migration
geetu040 c603383
add tests directory
geetu040 ff6a8b0
use enum for delay method
geetu040 f01898f
implement cache
geetu040 5c4511e
refactor clients
geetu040 43276d2
fix import in resources/base.py
geetu040 1206f69
refactor and add exception handling
geetu040 4948e99
refactor resources/base/
geetu040 a354167
implement delete
geetu040 1fe7e3e
implement publish and minor refactoring
geetu040 54a3151
implement tag/untag
geetu040 2b6fe65
implement fallback
geetu040 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| from openml._api.runtime.core import APIContext | ||
|
|
||
|
|
||
| def set_api_version(version: str, *, strict: bool = False) -> None: | ||
| api_context.set_version(version=version, strict=strict) | ||
|
|
||
|
|
||
| api_context = APIContext() | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| from .http import HTTPCache, HTTPClient | ||
|
|
||
| __all__ = [ | ||
| "HTTPCache", | ||
| "HTTPClient", | ||
| ] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
It's not clear what the function of the APIContext is here. Why do we need it and cannot just use
backenddirectly? E.g.:If it is just to avoid the pitfall where users assign the returned value to a local variable with a scope that is too long lived, then the same would apply if users would assign
api_context.backendto a variable. We could instead extend theAPIBackendclass to allow updates to its attributes?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 agree with you, it's not really useful, I am going to iterate over the design and will keep this in mind