Skip to content

Commit 2efb094

Browse files
committed
changed cache files for setup and run,
bugfix syntax and list indexing
1 parent bc25db8 commit 2efb094

4 files changed

Lines changed: 589 additions & 1038 deletions

File tree

openml/runs/functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ def obtain_field(xml_obj, fieldname, from_server, cast=None):
713713
parameters[key] = value
714714

715715
if 'oml:input_data' in run:
716-
dataset_id = int(run['oml:input_data']['oml:dataset'][0]['oml:did'])
716+
dataset_id = int(run['oml:input_data']['oml:dataset']['oml:did'])
717717
elif not from_server:
718718
dataset_id = None
719719

openml/setups/functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def _get_cached_setup(setup_id):
6262
cache_dir = config.get_cache_directory()
6363
setup_cache_dir = os.path.join(cache_dir, "setups", str(setup_id))
6464
try:
65-
setup_file = os.path.join(setup_cache_dir, "description.xml" % int(setup_id))
65+
setup_file = os.path.join(setup_cache_dir, "description.xml")
6666
with io.open(setup_file, encoding='utf8') as fh:
6767
setup_xml = xmltodict.parse(fh.read())
6868
setup = _create_setup_from_xml(setup_xml)

0 commit comments

Comments
 (0)