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

add already existing forecasts param #1597

Conversation

JanFidor
Copy link
Contributor

Fixes #1283

Summary

For now it's just a rough implementation, once it's green lit by @dennisbader i'll add some tests

Copy link
Collaborator

@dennisbader dennisbader left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @JanFidor for this!

Just one comment about the missing historical_forecasts defnition in the docs.
After that it's ready to be merged!

@@ -907,6 +907,7 @@ def historical_forecasts(
def backtest(
self,
series: Union[TimeSeries, Sequence[TimeSeries]],
historical_forecasts: Union[TimeSeries, Sequence[TimeSeries]] = None,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add the parameter definition to the docstring?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On it

@JanFidor
Copy link
Contributor Author

Hi @dennisbader, I have 3 quick questions about the PR:

  1. Should I add 1 or 2 tests for the param in test_backesting.py?
  2. Right now the forecasts param is second which imho makes sense when it comes to readability, but would be a breaking change when not using named params. Do you think it's worth it to stay with the more readable implementation?
  3. I was thinking about potential edge cases while browsing the file and noticed this line should I do something similar, but maybe instead of throwing an exception, log a warning and fallback on calling historical_forecasts() ?

@JanFidor
Copy link
Contributor Author

JanFidor commented Mar 3, 2023

@dennisbader I added the docstring, so everything should be ready for merging, if you think any of my proposed changes from the previous comment would be useful to the PR just let me know and I'll get on them!

Copy link
Collaborator

@dennisbader dennisbader left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @JanFidor , thanks again for another nice PR :)

Had only some minor comments.

A small unittest would be nice (maybe to existing backtest tests) to check wether we get identical results with and without provided historical_forecasts.

@codecov-commenter
Copy link

codecov-commenter commented Mar 10, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.08 ⚠️

Comparison is base (f7c292a) 94.13% compared to head (f2156fa) 94.05%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1597      +/-   ##
==========================================
- Coverage   94.13%   94.05%   -0.08%     
==========================================
  Files         125      125              
  Lines       11340    11328      -12     
==========================================
- Hits        10675    10655      -20     
- Misses        665      673       +8     
Impacted Files Coverage Δ
darts/models/forecasting/forecasting_model.py 96.87% <100.00%> (+0.01%) ⬆️

... and 9 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@dennisbader dennisbader left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @JanFidor and thanks for the updates and patience!

Only had minor suggestions mainly for rephrasing the docs.
After that we can merge this one 🚀

@JanFidor
Copy link
Contributor Author

Hi @dennisbader , thanks for the reviews and help with this PR! Special thanks for the suggested changes to the docs, writing them is still not my strong suit and something I'll have to keep working on ; )

Copy link
Collaborator

@dennisbader dennisbader left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @JanFidor 🚀

@dennisbader dennisbader merged commit be21ed8 into unit8co:master Mar 22, 2023
alexcolpitts96 pushed a commit to alexcolpitts96/darts that referenced this pull request May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Merge historical_forecast and backtests
4 participants