-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: 'AutoSklearnClassifier' object has no attribute 'load_models' #1061
Comments
This issue also occurred when using the 'refit' method on the experimental AutoSklearn2Classifier:
|
Experience the same issue with resampling strategy = 'cv' instead of default:
error:
|
Experiencing same issue.
|
Meet same problem:
|
I am also getting this AttributeError but with the Code automl = autosklearn.regression.AutoSklearnRegressor(
time_left_for_this_task=180,
per_run_time_limit=30,
tmp_folder='/tmp/autosklearn_regression_example_tmp',
output_folder='/tmp/autosklearn_regression_example_out',
delete_output_folder_after_terminate=False,
delete_tmp_folder_after_terminate=False
)
automl.fit(X_tr, y_tr, dataset_name=DATA_INPUT_PATH_TR.split("/")[-1].split(".")[0]) Error ---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
~/anaconda3/envs/auto-ml/lib/python3.8/site-packages/IPython/core/formatters.py in __call__(self, obj, include, exclude)
968
969 if method is not None:
--> 970 return method(include=include, exclude=exclude)
971 return None
972 else:
~/anaconda3/envs/auto-ml/lib/python3.8/site-packages/sklearn/base.py in _repr_mimebundle_(self, **kwargs)
462 def _repr_mimebundle_(self, **kwargs):
463 """Mime bundle used by jupyter kernels to display estimator"""
--> 464 output = {"text/plain": repr(self)}
465 if get_config()["display"] == 'diagram':
466 output["text/html"] = estimator_html_repr(self)
~/anaconda3/envs/auto-ml/lib/python3.8/site-packages/sklearn/base.py in __repr__(self, N_CHAR_MAX)
258 n_max_elements_to_show=N_MAX_ELEMENTS_TO_SHOW)
259
--> 260 repr_ = pp.pformat(self)
261
262 # Use bruteforce ellipsis when there are a lot of non-blank characters
~/anaconda3/envs/auto-ml/lib/python3.8/pprint.py in pformat(self, object)
151 def pformat(self, object):
152 sio = _StringIO()
--> 153 self._format(object, sio, 0, 0, {}, 0)
154 return sio.getvalue()
155
~/anaconda3/envs/auto-ml/lib/python3.8/pprint.py in _format(self, object, stream, indent, allowance, context, level)
168 self._readable = False
169 return
--> 170 rep = self._repr(object, context, level)
171 max_width = self._width - indent - allowance
172 if len(rep) > max_width:
~/anaconda3/envs/auto-ml/lib/python3.8/pprint.py in _repr(self, object, context, level)
402
403 def _repr(self, object, context, level):
--> 404 repr, readable, recursive = self.format(object, context.copy(),
405 self._depth, level)
406 if not readable:
~/anaconda3/envs/auto-ml/lib/python3.8/site-packages/sklearn/utils/_pprint.py in format(self, object, context, maxlevels, level)
178
179 def format(self, object, context, maxlevels, level):
--> 180 return _safe_repr(object, context, maxlevels, level,
181 changed_only=self._changed_only)
182
~/anaconda3/envs/auto-ml/lib/python3.8/site-packages/sklearn/utils/_pprint.py in _safe_repr(object, context, maxlevels, level, changed_only)
423 recursive = False
424 if changed_only:
--> 425 params = _changed_params(object)
426 else:
427 params = object.get_params(deep=False)
~/anaconda3/envs/auto-ml/lib/python3.8/site-packages/sklearn/utils/_pprint.py in _changed_params(estimator)
89 estimator with non-default values."""
90
---> 91 params = estimator.get_params(deep=False)
92 init_func = getattr(estimator.__init__, 'deprecated_original',
93 estimator.__init__)
~/anaconda3/envs/auto-ml/lib/python3.8/site-packages/sklearn/base.py in get_params(self, deep)
193 out = dict()
194 for key in self._get_param_names():
--> 195 value = getattr(self, key)
196 if deep and hasattr(value, 'get_params'):
197 deep_items = value.get_params().items()
AttributeError: 'AutoSklearnRegressor' object has no attribute 'load_models'
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
~/anaconda3/envs/auto-ml/lib/python3.8/site-packages/IPython/core/formatters.py in __call__(self, obj)
700 type_pprinters=self.type_printers,
701 deferred_pprinters=self.deferred_printers)
--> 702 printer.pretty(obj)
703 printer.flush()
704 return stream.getvalue()
~/anaconda3/envs/auto-ml/lib/python3.8/site-packages/IPython/lib/pretty.py in pretty(self, obj)
392 if cls is not object \
393 and callable(cls.__dict__.get('__repr__')):
--> 394 return _repr_pprint(obj, self, cycle)
395
396 return _default_pprint(obj, self, cycle)
~/anaconda3/envs/auto-ml/lib/python3.8/site-packages/IPython/lib/pretty.py in _repr_pprint(obj, p, cycle)
698 """A pprint that just redirects to the normal repr function."""
699 # Find newlines and replace them with p.break_()
--> 700 output = repr(obj)
701 lines = output.splitlines()
702 with p.group():
~/anaconda3/envs/auto-ml/lib/python3.8/site-packages/sklearn/base.py in __repr__(self, N_CHAR_MAX)
258 n_max_elements_to_show=N_MAX_ELEMENTS_TO_SHOW)
259
--> 260 repr_ = pp.pformat(self)
261
262 # Use bruteforce ellipsis when there are a lot of non-blank characters
~/anaconda3/envs/auto-ml/lib/python3.8/pprint.py in pformat(self, object)
151 def pformat(self, object):
152 sio = _StringIO()
--> 153 self._format(object, sio, 0, 0, {}, 0)
154 return sio.getvalue()
155
~/anaconda3/envs/auto-ml/lib/python3.8/pprint.py in _format(self, object, stream, indent, allowance, context, level)
168 self._readable = False
169 return
--> 170 rep = self._repr(object, context, level)
171 max_width = self._width - indent - allowance
172 if len(rep) > max_width:
~/anaconda3/envs/auto-ml/lib/python3.8/pprint.py in _repr(self, object, context, level)
402
403 def _repr(self, object, context, level):
--> 404 repr, readable, recursive = self.format(object, context.copy(),
405 self._depth, level)
406 if not readable:
~/anaconda3/envs/auto-ml/lib/python3.8/site-packages/sklearn/utils/_pprint.py in format(self, object, context, maxlevels, level)
178
179 def format(self, object, context, maxlevels, level):
--> 180 return _safe_repr(object, context, maxlevels, level,
181 changed_only=self._changed_only)
182
~/anaconda3/envs/auto-ml/lib/python3.8/site-packages/sklearn/utils/_pprint.py in _safe_repr(object, context, maxlevels, level, changed_only)
423 recursive = False
424 if changed_only:
--> 425 params = _changed_params(object)
426 else:
427 params = object.get_params(deep=False)
~/anaconda3/envs/auto-ml/lib/python3.8/site-packages/sklearn/utils/_pprint.py in _changed_params(estimator)
89 estimator with non-default values."""
90
---> 91 params = estimator.get_params(deep=False)
92 init_func = getattr(estimator.__init__, 'deprecated_original',
93 estimator.__init__)
~/anaconda3/envs/auto-ml/lib/python3.8/site-packages/sklearn/base.py in get_params(self, deep)
193 out = dict()
194 for key in self._get_param_names():
--> 195 value = getattr(self, key)
196 if deep and hasattr(value, 'get_params'):
197 deep_items = value.get_params().items()
AttributeError: 'AutoSklearnRegressor' object has no attribute 'load_models' |
I have the same error. System:
Error:
I decided to look at the attributes, and I see there is a _load_models:
|
Describe the bug
AttributeError: 'AutoSklearnClassifier' object has no attribute 'load_models'
when trying to score the model with cross validator.
To Reproduce
Run the following code with some dataset in X and y:
Expected behavior
I would expect a number to result from it.
Actual behavior, stacktrace or logfile
Stacktrace:
Environment and installation:
Please give details about your installation:
The text was updated successfully, but these errors were encountered: