MLBazaar / Cardea

An open source automl library for using machine learning in healthcare.

Home Page:https://mlbazaar.github.io/Cardea/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parameter 'presort' in 'sklearn.ensemble.GradientBoostingClassifier' has been deprecated since sklearn v0.22

ChengFR opened this issue · comments

  • Cardea version: 0.1.2.dev0
  • Python version: 3.6.8
  • MLBlocks: 0.4.0
  • MLPrimitives: 0.3.0

Description

Parameter presort in sklearn.ensemble.GradientBoostingClassifier has been deprecated since sklearn v0.22, which may cause trouble when running the primitive 'sklearn.ensemble.GradientBoostingClassifier' with MLPrimitive==0.3.0.

This problem can be solved by restricting the dependency scikit-learn>=0.21,<0.22 in Cardea.

What I Did

When running benchmarking with python cardea/benchmark/benchmark_cli.py, it raised

Exception caught building MLBlock sklearn.ensemble.GradientBoostingClassifier
Traceback (most recent call last):
  File "/Users/chengfurui/Projects/Cardea/ft-env/lib/python3.6/site-packages/mlblocks/mlpipeline.py", line 119, in _build_blocks
    block = MLBlock(primitive, **block_params)
  File "/Users/chengfurui/Projects/Cardea/ft-env/lib/python3.6/site-packages/mlblocks/mlblock.py", line 192, in __init__
    self.set_hyperparameters(default)
  File "/Users/chengfurui/Projects/Cardea/ft-env/lib/python3.6/site-packages/mlblocks/mlblock.py", line 240, in set_hyperparameters
    self.instance = self.primitive(**self.get_hyperparameters())
  File "/Users/chengfurui/Projects/Cardea/ft-env/lib/python3.6/site-packages/sklearn/utils/validation.py", line 63, in inner_f
    return f(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'presort'