ClimbsRocks / auto_ml

[UNMAINTAINED] Automated machine learning for analytics & production
http://auto-ml.readthedocs.io
MIT License
1.64k stars 310 forks source link

TypeError: __init__() got an unexpected keyword argument 'calc_feature_importance' #434

Closed shexuan closed 3 years ago

shexuan commented 4 years ago

hello, I got prolems blow

column_descriptions = {'age':'output'}
age_predictor = Predictor(type_of_estimator='classifier', column_descriptions=column_descriptions,)
age_predictor.train(train_age, model_names=['LGBMClassifer', 'DeepLearningClassifier'])

Error infomations:

Welcome to auto_ml! We're about to go through and make sense of your data using machine learning, and give you a production-ready pipeline to get predictions with.

If you have any issues, or new feature ideas, let us know at http://auto.ml
You are running on version 2.9.9
Now using the model training_params that you passed in:
{}
After overwriting our defaults with your values, here are the final params that will be used to initialize the model:
{}
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-18-54766f1f5a4d> in <module>
      1 column_descriptions = {'age':'output'}
      2 age_predictor = Predictor(type_of_estimator='classifier', column_descriptions=column_descriptions,)
----> 3 age_predictor.train(train_age, model_names=['LGBMClassifer', 'DeepLearningClassifier'])

~/.conda/envs/py36/lib/python3.6/site-packages/auto_ml/predictor.py in train(***failed resolving arguments***)
    641                         estimator_names = self._get_estimator_names()
    642 
--> 643                     X_df = self.fit_transformation_pipeline(X_df, y, estimator_names)
    644             else:
    645                 X_df = self.transformation_pipeline.transform(X_df)

~/.conda/envs/py36/lib/python3.6/site-packages/auto_ml/predictor.py in fit_transformation_pipeline(self, X_df, y, model_names)
    884 
    885         self.keep_cat_features = keep_cat_features
--> 886         ppl = self._construct_pipeline(model_name=model_names[0], keep_cat_features=self.keep_cat_features)
    887         ppl.steps.pop()
    888 

~/.conda/envs/py36/lib/python3.6/site-packages/auto_ml/predictor.py in _construct_pipeline(self, model_name, trained_pipeline, final_model, feature_learning, final_model_step_name, prediction_interval, keep_cat_features, is_hp_search)
    202                 params = self.training_params
    203 
--> 204             final_model = utils_models.get_model_from_name(model_name, training_params=params)
    205             pipeline_list.append(('final_model', utils_model_training.FinalModelATC(model=final_model, type_of_estimator=self.type_of_estimator, ml_for_analytics=self.ml_for_analytics, name=self.name, _scorer=self._scorer, feature_learning=feature_learning, uncertainty_model=self.need_to_train_uncertainty_model, training_prediction_intervals=training_prediction_intervals, column_descriptions=self.column_descriptions, training_features=training_features, keep_cat_features=keep_cat_features, is_hp_search=is_hp_search, X_test=self.X_test, y_test=self.y_test)))
    206 

~/.conda/envs/py36/lib/python3.6/site-packages/auto_ml/utils_models.py in get_model_from_name(model_name, training_params, is_hp_search)
    174 
    175     if catboost_installed:
--> 176         model_map['CatBoostRegressor'] = CatBoostRegressor(calc_feature_importance=True)
    177         model_map['CatBoostClassifier'] = CatBoostClassifier(calc_feature_importance=True)
    178 

TypeError: __init__() got an unexpected keyword argument 'calc_feature_importance'

Is this project no longer matained ?

davins90 commented 4 years ago

i have the same problem!

albertchristian92 commented 3 years ago

I have the same problem, this doesn't work for me.

You can downgrade catboost to <0.9, e.g. pip install "catboost<0.9" to get around this.

dingguo1996 commented 3 years ago

I have the same problem, this doesn't work for me.

You can downgrade catboost to <0.9, e.g. pip install "catboost<0.9" to get around this.

This also doesn't work for me.