TypeError: '<=' not supported between instances of 'float' and 'str'

Mindsdb version: 2.26.0
Environment: Google Colabs

Getting the following error when training the data.

/usr/local/lib/python3.7/dist-packages/mindsdb_native/libs/helpers/confidence_helpers.py in get_anomalies(bounds, observed_series, cooldown)

145 for (l, u), t in zip(bounds, observed_series):
146 if t is not None:
–>147 anomaly = not (l <= t <= u)
149 if anomaly and (counter == 0 or counter >= cooldown):

TypeError: ‘<=’ not supported between instances of ‘float’ and ‘str’

I am able to overcome this problem when running mindsdb version 2.22.0

Thanks for reporting @eskibla. If it is possible can you please share example of your data so we can try to reproduce it?

@Zoran Please find the data here

1 Like

Thanks. I was able to reproduce the issue, we will migrate to using openpyxl instead of xlrd because they are supporting only xls files with the latest version. The fix should be available soon, I will ping you when we push to pypi.

1 Like

Hi @eskibla, are you training in time series mode? How many predictions have you set in the options?

1 Like

Yes I am training in timeseries mode and I have set the number of predictions to 6.

1 Like

Perfect, we could reproduce and identified an issue in our anomaly detection flow. The fix has been implemented and we will be merging it into the next mindsdb release. Will report back once that’s happened. Cheers!

1 Like

Actually, there were 2 issues with this file :slight_smile: First one related to the GUI and parsing xslx file and the second one related to casting float in anomaly detection. Thanks again @eskibla. Have a great weekend :raised_hands:

Problem has been resolved. Thank you

Perfect, closing this issue.