|
27 | 27 | openml_logger = logging.getLogger("openml") |
28 | 28 |
|
29 | 29 |
|
30 | | -SERVERS_REGISTRY: dict[str, dict[APIVersion, dict[str, str | None]]] = { |
| 30 | +_SERVERS_REGISTRY: dict[str, dict[APIVersion, dict[str, str | None]]] = { |
31 | 31 | "production": { |
32 | 32 | APIVersion.V1: { |
33 | 33 | "server": "https://www.openml.org/api/v1/xml/", |
@@ -97,7 +97,7 @@ class OpenMLConfig: |
97 | 97 | """Dataclass storing the OpenML configuration.""" |
98 | 98 |
|
99 | 99 | servers: dict[APIVersion, dict[str, str | None]] = field( |
100 | | - default_factory=lambda: deepcopy(SERVERS_REGISTRY["production"]) |
| 100 | + default_factory=lambda: deepcopy(_SERVERS_REGISTRY["production"]) |
101 | 101 | ) |
102 | 102 | api_version: APIVersion = APIVersion.V1 |
103 | 103 | fallback_api_version: APIVersion | None = None |
@@ -252,11 +252,11 @@ def get_server_base_url(self) -> str: |
252 | 252 | return domain.replace("api", "www") |
253 | 253 |
|
254 | 254 | def get_servers(self, mode: str) -> dict[APIVersion, dict[str, str | None]]: |
255 | | - if mode not in SERVERS_REGISTRY: |
| 255 | + if mode not in _SERVERS_REGISTRY: |
256 | 256 | raise ValueError( |
257 | | - f'invalid mode="{mode}" allowed modes: {", ".join(list(SERVERS_REGISTRY.keys()))}' |
| 257 | + f'invalid mode="{mode}" allowed modes: {", ".join(list(_SERVERS_REGISTRY.keys()))}' |
258 | 258 | ) |
259 | | - return deepcopy(SERVERS_REGISTRY[mode]) |
| 259 | + return deepcopy(_SERVERS_REGISTRY[mode]) |
260 | 260 |
|
261 | 261 | def set_servers(self, mode: str) -> None: |
262 | 262 | servers = self.get_servers(mode) |
|
0 commit comments