evidentlyai / evidently

Evidently is ​​an open-source ML and LLM observability framework. Evaluate, test, and monitor any AI-powered system or data pipeline. From tabular data to Gen AI. 100+ metrics.
https://www.evidentlyai.com/evidently-oss
Apache License 2.0
5.46k stars 604 forks source link

Fix `datasets.load_iris` parameter in the README #1273

Closed gcbeltramini closed 2 months ago

gcbeltramini commented 3 months ago

Problem description

evidently requires scikit-learn>=1.0.1 (source), but since scikit-learn version 1.3.0 (PR https://github.com/scikit-learn/scikit-learn/pull/26177), the command

from sklearn import datasets

iris_data = datasets.load_iris(as_frame='auto')

raises the following error:

InvalidParameterError: The 'as_frame' parameter of load_iris must be an instance of 'bool', an instance of 'numpy.bool_' or an instance of 'int'. Got 'auto' instead.

Proposed changes

Changing the command to iris_data = datasets.load_iris(as_frame=True) fixes the error, and iris_frame = iris_data.frame returns a pandas.DataFrame.