Skip to content

Commit e20b463

Browse files
committed
switch to ordered dict
1 parent 5405778 commit e20b463

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

openml/evaluations/functions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import xmltodict
33
import pandas as pd
44
from typing import Union, List, Optional, Dict
5+
import collections
56

67
import openml.utils
78
import openml._api_calls
@@ -168,7 +169,7 @@ def __list_evaluations(api_call, output_format='object'):
168169
assert type(evals_dict['oml:evaluations']['oml:evaluation']) == list, \
169170
type(evals_dict['oml:evaluations'])
170171

171-
evals = dict()
172+
evals = collections.OrderedDict()
172173
for eval_ in evals_dict['oml:evaluations']['oml:evaluation']:
173174
run_id = int(eval_['oml:run_id'])
174175
value = None

openml/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import warnings
66
import pandas as pd
77
from functools import wraps
8+
import collections
89

910
import openml._api_calls
1011
import openml.exceptions
@@ -182,7 +183,7 @@ def _list_all(listing_call, output_format='dict', *args, **filters):
182183
active_filters = {key: value for key, value in filters.items()
183184
if value is not None}
184185
page = 0
185-
result = {}
186+
result = collections.OrderedDict()
186187
if output_format == 'dataframe':
187188
result = pd.DataFrame()
188189

0 commit comments

Comments
 (0)