Skip to content

Commit 65a50cd

Browse files
committed
MAINT fix issue with only test data being available and one hot encoding
1 parent 1bdebe9 commit 65a50cd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

autosklearn/data/abstract_data_manager.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,13 @@ def perform1HotEncoding(self):
6363

6464
self.info['is_sparse'] = 1 if sparse else 0
6565
self.data['X_train'] = data[0]
66-
if 'X_valid' in self.data:
66+
if 'X_valid' in self.data and 'X_test' in self.data:
6767
self.data['X_valid'] = data[1]
68-
if 'X_test' in self.data:
6968
self.data['X_test'] = data[2]
69+
elif 'X_valid' in self.data:
70+
self.data['X_valid'] = data[1]
71+
elif 'X_test' in self.data:
72+
self.data['X_test'] = data[1]
7073

7174
def __repr__(self):
7275
return 'DataManager : ' + self.name

0 commit comments

Comments
 (0)