You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
since for polars the dates are a numpy array which are then plugged into a pandas date_range and they loose their units there. We're currently working on changing those functions so we'll make sure the units are preserved in the new version, thanks for raising this.
yeah I noticed it was building up a pandas df and then converting to polars. Of course, long term, if it were setup so that it only uses the library of the input that'd be even better but figured my snippet is the fastest way to address the issue in the short term.
I was actually pleasantly surprised the library has polars recognition and support at all so I appreciate where it is so don't take that as a complaint.
What happened + What you expected to happen
When training from a polars dataframe, the time unit of the original df isn't used for predictions/forecasts. This means we can't join the two dfs.
One way to fix that would be...
I see that there's this line in core.py:
I think there needs to be something like
and then in:
that should be
I don't know if there's anywhere else that needs to be done but that's what looks like would fix it.
Versions / Dependencies
statsforecast version=1.6.0
polars version = 0.19.13
Reproduction script
I took the Electricity Load Forecast for example and used polars from the beginning instead of pandas like this
Note how ds is a
datetime[ns]
but
from the source df it is
datetime[μs]
that means that we can't join them directly.
Issue Severity
Low: It annoys or frustrates me.
The text was updated successfully, but these errors were encountered: