Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
0159f47
set up folder structure and base code
geetu040 Dec 30, 2025
58e9175
Merge branch 'main' into migration
fkiraly Dec 31, 2025
bdd65ff
Merge branch 'main' into migration
geetu040 Jan 1, 2026
52ef379
fix pre-commit
geetu040 Jan 5, 2026
5dfcbce
refactor
geetu040 Jan 7, 2026
2acbe99
implement cache_dir
geetu040 Jan 7, 2026
af99880
refactor
geetu040 Jan 7, 2026
74ab366
Merge branch 'main' into pr/1576
fkiraly Jan 7, 2026
4c75e16
undo changes in tasks/functions.py
geetu040 Jan 15, 2026
5762185
Merge branch 'main' into migration
geetu040 Jan 15, 2026
7e9bc1f
Merge branch 'main' into migration
geetu040 Jan 21, 2026
c603383
add tests directory
geetu040 Jan 21, 2026
ff6a8b0
use enum for delay method
geetu040 Jan 21, 2026
f01898f
implement cache
geetu040 Jan 21, 2026
5c4511e
refactor clients
geetu040 Jan 21, 2026
43276d2
fix import in resources/base.py
geetu040 Jan 23, 2026
1206f69
refactor and add exception handling
geetu040 Jan 26, 2026
4948e99
refactor resources/base/
geetu040 Jan 26, 2026
a354167
implement delete
geetu040 Jan 26, 2026
1fe7e3e
implement publish and minor refactoring
geetu040 Jan 27, 2026
54a3151
implement tag/untag
geetu040 Jan 27, 2026
2b6fe65
implement fallback
geetu040 Jan 27, 2026
fa53f8d
add test_http.py
geetu040 Jan 28, 2026
2b2db96
add uses_test_server marker
geetu040 Jan 28, 2026
c9617f9
implement reset_cache
geetu040 Jan 29, 2026
5bc37b8
fixes with publish/delete
geetu040 Jan 29, 2026
08d9916
fix cache_key in tests
geetu040 Jan 29, 2026
8caba11
update _not_supported
geetu040 Jan 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions openml/_api/__init__.py
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()
Comment on lines +1 to +8
Copy link
Collaborator

@PGijsbers PGijsbers Jan 15, 2026

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 backend directly? E.g.:

Suggested change
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()
from openml._api.runtime.core import build_backend
_backend = build_backend("v1", strict=False)
def set_api_version(version: str, *, strict: bool = False) -> None:
global _backend
_backend = build_backend(version=version, strict=strict)
def backend() -> APIBackend:
return _backend

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.backend to a variable. We could instead extend the APIBackend class to allow updates to its attributes?

Copy link
Collaborator Author

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

6 changes: 6 additions & 0 deletions openml/_api/clients/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from .http import HTTPCache, HTTPClient

__all__ = [
"HTTPCache",
"HTTPClient",
]
Loading