time-series-foundation-models / lag-llama

Lag-Llama: Towards Foundation Models for Probabilistic Time Series Forecasting
Apache License 2.0
1.09k stars 121 forks source link

Compatibility Issue with pandas==2.2.0 and to_offset('Q') Function #1

Closed nmharmon8 closed 3 months ago

nmharmon8 commented 4 months ago

Summary:

Encountered an incompatibility issue with pandas==2.2.0 where using to_offset('Q') raises an exception for "invalid frequency". This functionality works as expected in pandas==2.1.4. Suggesting an update to the requirements to specify the pandas version to ensure compatibility.

Steps to Reproduce:

Set up a Docker container with dependencies specified in the requirements file, which defaults to using pandas==2.2.0. Execute the following Python code:

from pandas.tseries.frequencies import to_offset
to_offset('Q')

Observe the raised exception.

Expected Behavior: The to_offset('Q') call should correctly interpret 'Q' as a quarterly frequency without raising an exception.

Actual Behavior:

When running with pandas==2.2.0, the code raises the following exception:

raise Exception("invalid frequency")
ashok-arjun commented 4 months ago

Hi @nmharmon8, yes, this is a well known issue with pandas 2.2.0 since the aliases for the frequencies have changed in pandas 2.2.0.

Thanks for letting us know! I'll update the requirements file with the right pandas version.