Skip to content

Commit b4ff0b2

Browse files
committed
remove unused migration code
1 parent 3c29e71 commit b4ff0b2

1 file changed

Lines changed: 0 additions & 19 deletions

File tree

openml/testing.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
import requests
1616

1717
import openml
18-
from openml._api import API_REGISTRY, HTTPCache, HTTPClient, MinIOClient, ResourceAPI
19-
from openml.enums import APIVersion, ResourceType
2018
from openml.exceptions import OpenMLServerException
2119
from openml.tasks import TaskType
2220

@@ -55,11 +53,6 @@ class TestBase(unittest.TestCase):
5553
logger = logging.getLogger("unit_tests_published_entities")
5654
logger.setLevel(logging.DEBUG)
5755

58-
# migration-specific attributes
59-
cache: HTTPCache
60-
http_clients: dict[APIVersion, HTTPClient]
61-
minio_client: MinIOClient
62-
6356
def setUp(self, n_levels: int = 1, tmpdir_suffix: str = "") -> None:
6457
"""Setup variables and temporary directories.
6558
@@ -111,13 +104,6 @@ def setUp(self, n_levels: int = 1, tmpdir_suffix: str = "") -> None:
111104
self.connection_n_retries = openml.config.connection_n_retries
112105
openml.config.set_retry_policy("robot", n_retries=20)
113106

114-
self.cache = HTTPCache()
115-
self.http_clients = {
116-
APIVersion.V1: HTTPClient(api_version=APIVersion.V1),
117-
APIVersion.V2: HTTPClient(api_version=APIVersion.V2),
118-
}
119-
self.minio_client = MinIOClient()
120-
121107
def use_production_server(self) -> None:
122108
"""
123109
Use the production server for the OpenML API calls.
@@ -284,11 +270,6 @@ def _check_fold_timing_evaluations( # noqa: PLR0913
284270
assert evaluation >= min_val
285271
assert evaluation <= max_val
286272

287-
def _create_resource(self, api_version: APIVersion, resource_type: ResourceType) -> ResourceAPI:
288-
http_client = self.http_clients[api_version]
289-
resource_cls = API_REGISTRY[api_version][resource_type]
290-
return resource_cls(http=http_client, minio=self.minio_client)
291-
292273

293274
def check_task_existence(
294275
task_type: TaskType,

0 commit comments

Comments
 (0)