Cannot predict with numpy inputs
leelew opened this issue · 1 comments
Hi,
I trained AutoML model for regression task. But when I use model.predict()
, it returns TypeError. So how can I fix this problem?
Best,
Li
Traceback (most recent call last):
File "", line 1, in
File "/home/lilu/anaconda3/envs/am/lib/python3.10/site-packages/flaml/automl/automl.py", line 573, in predict
X = self._state.task.preprocess(X, self._transformer)
File "/home/lilu/anaconda3/envs/am/lib/python3.10/site-packages/flaml/automl/task/generic_task.py", line 637, in preprocess
X = transformer.transform(X)
File "/home/lilu/anaconda3/envs/am/lib/python3.10/site-packages/flaml/automl/data.py", line 394, in transform
elif isinstance(X, DataFrame):
TypeError: isinstance() arg 2 must be a type, a tuple of types, or a union
try:
import pandas as pd
from pandas import DataFrame, Series
except ImportError:
DataFrame = Series = pd = None
Could you check if you have installed pandas?
That may be the cause of the error...