Skip to content

Commit 8185ccc

Browse files
geetu040satvshrfkiralySimonBlankepre-commit-ci[bot]
authored
[ENH] V1 β†’ V2 API Migration - core structure (#1576)
Towards #1575 This PR sets up the core folder and file structure along with base scaffolding for the API v1 β†’ v2 migration. It includes: * Skeleton for the HTTP client, backend, and API context * Abstract resource interfaces and versioned stubs (`*V1`, `*V2`) * Minimal wiring to allow future version switching and fallback support No functional endpoints are migrated yet. This PR establishes a stable foundation for subsequent migration and refactor work. --------- Co-authored-by: Satvik Mishra <112589278+satvshr@users.noreply.github.com> Co-authored-by: Franz KirΓ‘ly <fkiraly@gcos.ai> Co-authored-by: Simon Blanke <simon.blanke@yahoo.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Matthias Feurer <lists@matthiasfeurer.de> Co-authored-by: Pieter Gijsbers <p.gijsbers@tue.nl>
1 parent 8a5532f commit 8185ccc

39 files changed

Lines changed: 3031 additions & 118 deletions

β€Žopenml/__init__.pyβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
utils,
3636
)
3737
from .__version__ import __version__
38+
from ._api import _backend
3839
from .datasets import OpenMLDataFeature, OpenMLDataset
3940
from .evaluations import OpenMLEvaluation
4041
from .flows import OpenMLFlow
@@ -116,6 +117,7 @@ def populate_cache(
116117
"OpenMLTask",
117118
"__version__",
118119
"_api_calls",
120+
"_backend",
119121
"config",
120122
"datasets",
121123
"evaluations",

β€Žopenml/_api/__init__.pyβ€Ž

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
from .clients import (
2+
HTTPCache,
3+
HTTPClient,
4+
MinIOClient,
5+
)
6+
from .resources import (
7+
API_REGISTRY,
8+
DatasetAPI,
9+
DatasetV1API,
10+
DatasetV2API,
11+
EstimationProcedureAPI,
12+
EstimationProcedureV1API,
13+
EstimationProcedureV2API,
14+
EvaluationAPI,
15+
EvaluationMeasureAPI,
16+
EvaluationMeasureV1API,
17+
EvaluationMeasureV2API,
18+
EvaluationV1API,
19+
EvaluationV2API,
20+
FallbackProxy,
21+
FlowAPI,
22+
FlowV1API,
23+
FlowV2API,
24+
ResourceAPI,
25+
ResourceV1API,
26+
ResourceV2API,
27+
RunAPI,
28+
RunV1API,
29+
RunV2API,
30+
SetupAPI,
31+
SetupV1API,
32+
SetupV2API,
33+
StudyAPI,
34+
StudyV1API,
35+
StudyV2API,
36+
TaskAPI,
37+
TaskV1API,
38+
TaskV2API,
39+
)
40+
from .setup import (
41+
APIBackend,
42+
APIBackendBuilder,
43+
_backend,
44+
)
45+
46+
__all__ = [
47+
"API_REGISTRY",
48+
"APIBackend",
49+
"APIBackendBuilder",
50+
"DatasetAPI",
51+
"DatasetV1API",
52+
"DatasetV2API",
53+
"EstimationProcedureAPI",
54+
"EstimationProcedureV1API",
55+
"EstimationProcedureV2API",
56+
"EvaluationAPI",
57+
"EvaluationMeasureAPI",
58+
"EvaluationMeasureV1API",
59+
"EvaluationMeasureV2API",
60+
"EvaluationV1API",
61+
"EvaluationV2API",
62+
"FallbackProxy",
63+
"FlowAPI",
64+
"FlowV1API",
65+
"FlowV2API",
66+
"HTTPCache",
67+
"HTTPClient",
68+
"MinIOClient",
69+
"ResourceAPI",
70+
"ResourceV1API",
71+
"ResourceV2API",
72+
"RunAPI",
73+
"RunV1API",
74+
"RunV2API",
75+
"SetupAPI",
76+
"SetupV1API",
77+
"SetupV2API",
78+
"StudyAPI",
79+
"StudyV1API",
80+
"StudyV2API",
81+
"TaskAPI",
82+
"TaskV1API",
83+
"TaskV2API",
84+
"_backend",
85+
]
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from .http import HTTPCache, HTTPClient
2+
from .minio import MinIOClient
3+
4+
__all__ = [
5+
"HTTPCache",
6+
"HTTPClient",
7+
"MinIOClient",
8+
]

0 commit comments

Comments
Β (0)