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

Fix wrong call to TimeSeries.from_series() #2719

Merged
merged 3 commits into from
Mar 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ but cannot always guarantee backwards compatibility. Changes that may **break co
**Fixed**

- 🔴 / 🟢 Fixed a bug which raised an error when loading torch models that were saved with Darts versions < 0.33.0. This is a breaking change and models saved with version 0.33.0 will not be loadable anymore. [#2692](https://github.com/unit8co/darts/pull/2692) by [Dennis Bader](https://github.com/dennisbader).
- Fixed a bug in `13-TFT-examples.ipynb` where two calls to `TimeSeries.from_series()` were not providing `series` but `pd.Index`. The method calls were changed to `TimeSeries.from_values()`. [#2719](https://github.com/unit8co/darts/pull/2719) by [Jules Authier](https://github.com/authierj)

**Dependencies**

Expand Down
4 changes: 2 additions & 2 deletions examples/13-TFT-examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
"series = AirPassengersDataset().load()\n",
"\n",
"# we convert monthly number of passengers to average daily number of passengers per month\n",
"series = series / TimeSeries.from_series(series.time_index.days_in_month)\n",
"series = series / TimeSeries.from_values(series.time_index.days_in_month)\n",
"series = series.astype(np.float32)\n",
"\n",
"# Create training and validation sets:\n",
Expand Down Expand Up @@ -570,7 +570,7 @@
"for col in [\"ice cream\", \"heater\"]:\n",
" converted_series.append(\n",
" series_ice_heater[col]\n",
" / TimeSeries.from_series(series_ice_heater.time_index.days_in_month)\n",
" / TimeSeries.from_values(series_ice_heater.time_index.days_in_month)\n",
" )\n",
"converted_series = concatenate(converted_series, axis=1)\n",
"converted_series = converted_series[pd.Timestamp(\"20100101\") :]\n",
Expand Down
Loading