Skip to content

Commit fdde853

Browse files
Merge branch 'master' of https://github.com/openml/python
2 parents 13c4db6 + 2915475 commit fdde853

6 files changed

Lines changed: 11 additions & 10 deletions

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@
55

66
A python interface for [OpenML](http://openml.org). The documentation is
77
hosted at [readthedocs.org](https://readthedocs.org/projects/openml/).
8+
9+
Please commit to the right branches following the gitflow pattern:
10+
http://nvie.com/posts/a-successful-git-branching-model/

openml/entities/dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def get_dataset(self, target=None, include_row_id=False,
134134
raise ValueError("Cannot find a ndarray file for dataset %s at"
135135
"location %s " % (self.name, path))
136136
else:
137-
with open(path) as fh:
137+
with open(path, "rb") as fh:
138138
data, categorical, attribute_names = pickle.load(fh)
139139

140140
to_exclude = []

openml/entities/split.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,11 @@ def __eq__(self, other):
4343
return False
4444
else:
4545
for fold in self.split[repetition]:
46-
if all(self.split[repetition][fold][0] != \
47-
other.split[repetition][fold][0]) and \
48-
all(self.split[repetition][fold][1] != \
49-
other.split[repetition][fold][1]):
46+
if np.all(self.split[repetition][fold].test != \
47+
other.split[repetition][fold].test)\
48+
and \
49+
np.all(self.split[repetition][fold].train
50+
!= other.split[repetition][fold].train):
5051
return False
5152
return True
5253

tests/entities/test_split.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def test_eq(self):
4343
self.assertNotEqual(split, split2)
4444

4545
split2 = OpenMLSplit.from_arff_file(self.arff_filename)
46-
split2.split[0][0] = (np.zeros((80)), np.zeros((9)))
46+
split2.split[0][0] = Split(np.zeros((80)), np.zeros((9)))
4747
self.assertNotEqual(split, split2)
4848

4949
def test_from_arff_file(self):

tests/entities/tmp.pkl

Whitespace-only changes.

tests/test_apiconnector.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,6 @@ def check_run(run):
234234
self.assertEqual(len(run), 6)
235235

236236
runs = self.connector.get_runs_list(task_id=1)
237-
# 1759 as the number of supervised classification tasks retrieved
238-
# openml.org from this call; don't trust the number on openml.org as
239-
# it also counts private datasets
240237
self.assertGreaterEqual(len(runs), 800)
241238
for run in runs:
242239
check_run(run)
@@ -247,7 +244,7 @@ def check_run(run):
247244
check_run(run)
248245

249246
runs = self.connector.get_runs_list(setup_id=1)
250-
self.assertGreaterEqual(len(runs), 261)
247+
self.assertGreaterEqual(len(runs), 260)
251248
for run in runs:
252249
check_run(run)
253250

0 commit comments

Comments
 (0)