|
9 | 9 | import xmltodict |
10 | 10 |
|
11 | 11 | import openml.utils |
| 12 | +import openml._api_calls |
12 | 13 | from .dataset import OpenMLDataset |
13 | 14 | from ..exceptions import OpenMLCacheException, OpenMLServerNoResult, \ |
14 | 15 | OpenMLHashException |
15 | 16 | from .. import config |
16 | | -from .._api_calls import _perform_api_call, _read_url |
| 17 | +from .._api_calls import _read_url |
17 | 18 |
|
18 | 19 |
|
19 | 20 | ############################################################################ |
@@ -206,7 +207,7 @@ def _list_datasets(**kwargs): |
206 | 207 |
|
207 | 208 | def __list_datasets(api_call): |
208 | 209 |
|
209 | | - xml_string = _perform_api_call(api_call) |
| 210 | + xml_string = openml._api_calls._perform_api_call(api_call) |
210 | 211 | datasets_dict = xmltodict.parse(xml_string, force_list=('oml:dataset',)) |
211 | 212 |
|
212 | 213 | # Minimalistic check if the XML is useful |
@@ -357,7 +358,7 @@ def _get_dataset_description(did_cache_dir, dataset_id): |
357 | 358 | try: |
358 | 359 | return _get_cached_dataset_description(dataset_id) |
359 | 360 | except (OpenMLCacheException): |
360 | | - dataset_xml = _perform_api_call("data/%d" % dataset_id) |
| 361 | + dataset_xml = openml._api_calls._perform_api_call("data/%d" % dataset_id) |
361 | 362 |
|
362 | 363 | with io.open(description_file, "w", encoding='utf8') as fh: |
363 | 364 | fh.write(dataset_xml) |
@@ -450,7 +451,7 @@ def _get_dataset_features(did_cache_dir, dataset_id): |
450 | 451 | with io.open(features_file, encoding='utf8') as fh: |
451 | 452 | features_xml = fh.read() |
452 | 453 | except (OSError, IOError): |
453 | | - features_xml = _perform_api_call("data/features/%d" % dataset_id) |
| 454 | + features_xml = openml._api_calls._perform_api_call("data/features/%d" % dataset_id) |
454 | 455 |
|
455 | 456 | with io.open(features_file, "w", encoding='utf8') as fh: |
456 | 457 | fh.write(features_xml) |
@@ -486,7 +487,7 @@ def _get_dataset_qualities(did_cache_dir, dataset_id): |
486 | 487 | with io.open(qualities_file, encoding='utf8') as fh: |
487 | 488 | qualities_xml = fh.read() |
488 | 489 | except (OSError, IOError): |
489 | | - qualities_xml = _perform_api_call("data/qualities/%d" % dataset_id) |
| 490 | + qualities_xml = openml._api_calls._perform_api_call("data/qualities/%d" % dataset_id) |
490 | 491 |
|
491 | 492 | with io.open(qualities_file, "w", encoding='utf8') as fh: |
492 | 493 | fh.write(qualities_xml) |
|
0 commit comments