Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion autosklearn/automl.py
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@ def fit(

@staticmethod
def subsample_if_too_large(X, y, logger, seed, memory_limit, task):
if isinstance(X, np.ndarray):
if memory_limit and isinstance(X, np.ndarray):
if X.dtype == np.float32:
multiplier = 4
elif X.dtype in (np.float64, np.float):
Expand Down
12 changes: 6 additions & 6 deletions test/test_automl/test_automl.py
Original file line number Diff line number Diff line change
Expand Up @@ -664,16 +664,16 @@ def test_fail_if_feat_type_on_pandas_input(backend, dask_client):
[
(memory_limit, task)
for task in itertools.chain(CLASSIFICATION_TASKS, REGRESSION_TASKS)
for memory_limit in (1, 10)
for memory_limit in (1, 10, None)
]
)
def test_subsample_if_too_large(memory_limit, task):
fixture = {
BINARY_CLASSIFICATION: {1: 436, 10: 569},
MULTICLASS_CLASSIFICATION: {1: 204, 10: 1797},
MULTILABEL_CLASSIFICATION: {1: 204, 10: 1797},
REGRESSION: {1: 1310, 10: 1326},
MULTIOUTPUT_REGRESSION: {1: 1310, 10: 1326}
BINARY_CLASSIFICATION: {1: 436, 10: 569, None: 569},
MULTICLASS_CLASSIFICATION: {1: 204, 10: 1797, None: 1797},
MULTILABEL_CLASSIFICATION: {1: 204, 10: 1797, None: 1797},
REGRESSION: {1: 1310, 10: 1326, None: 1326},
MULTIOUTPUT_REGRESSION: {1: 1310, 10: 1326, None: 1326}
}
mock = unittest.mock.Mock()
if task == BINARY_CLASSIFICATION:
Expand Down