Skip to content

Execution fails when tries to set no memory limit for model building #1117

Closed
@rabsr

Description

@rabsr

Describe the bug

Execution errors out when None is used for memory_limit

automl = autosklearn.classification.AutoSklearnClassifier(
    time_left_for_this_task=120,
    per_run_time_limit=30,
    tmp_folder='/tmp/autosklearn_classification_example_tmp',
    output_folder='/tmp/autosklearn_classification_example_out',
    memory_limit=None,
)
automl.fit(X_train, y_train, dataset_name='breast_cancer')

Actual behavior, stacktrace or logfile

Traceback (most recent call last):
  File "example_classification.py", line 35, in <module>
    automl.fit(X_train, y_train, dataset_name='breast_cancer')
  File "opensource/auto-sklearn/autosklearn/estimators.py", line 598, in fit
    dataset_name=dataset_name,
  File "opensource/auto-sklearn/autosklearn/estimators.py", line 357, in fit
    self.automl_.fit(load_models=self.load_models, **kwargs)
  File "opensource/auto-sklearn/autosklearn/automl.py", line 1422, in fit
    is_classification=True,
  File "opensource/auto-sklearn/autosklearn/automl.py", line 487, in fit
    task=self._task,
  File "opensource/auto-sklearn/autosklearn/automl.py", line 830, in subsample_if_too_large
    if memory_limit <= megabytes * 10:
TypeError: '<=' not supported between instances of 'NoneType' and 'float'

Environment and installation:

Please give details about your installation:

  • Is your installation in a virtual environment or conda environment? virtaul environment
  • Python version: 3.7.3
  • Auto-sklearn version: development branch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions