Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] pandas incompatibility 2.0.3 #1728

Open
moghadas76 opened this issue Dec 16, 2024 · 1 comment
Open

[BUG] pandas incompatibility 2.0.3 #1728

moghadas76 opened this issue Dec 16, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@moghadas76
Copy link

File ~/miniconda3/envs/env/lib/python3.11/site-packages/pytorch_forecasting/data/timeseries.py:490, in TimeSeriesDataSet.init..(x)
486 # filter data
487 if min_prediction_idx is not None:
488 # filtering for min_prediction_idx will be done on subsequence level ensuring
489 # minimal decoder index is always >= min_prediction_idx
--> 490 data = data[lambda x: x[self.time_idx] >= self.min_prediction_idx - self.max_encoder_length - self.max_lag]
491 data = data.sort_values(self.group_ids + [self.time_idx])
493 # preprocess data

File ~/miniconda3/envs/env/lib/python3.11/site-packages/pandas/_libs/tslibs/timestamps.pyx:493, in pandas._libs.tslibs.timestamps._Timestamp.sub()

File ~/miniconda3/envs/env/lib/python3.11/site-packages/pandas/_libs/tslibs/timestamps.pyx:461, in pandas._libs.tslibs.timestamps._Timestamp.add()

TypeError: Addition/subtraction of integers and integer-arrays with Timestamp is no longer supported. Instead of adding/subtracting n, use n * obj.freq

pandas 2.0.3

@moghadas76 moghadas76 added the bug Something isn't working label Dec 16, 2024
@github-project-automation github-project-automation bot moved this to Needs triage & validation in Bugfixing - pytorch-forecasting Dec 16, 2024
@fkiraly
Copy link
Collaborator

fkiraly commented Dec 20, 2024

Can you kindly provide full code, with all imports, to reproduce the error?

@fkiraly fkiraly moved this from Needs triage & validation to Reproducing/confirming in Bugfixing - pytorch-forecasting Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Reproducing/confirming
Development

No branches or pull requests

2 participants