-
Notifications
You must be signed in to change notification settings - Fork 473
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
[refactor] Extract plot utils into dedicated file #1000
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1000 +/- ##
=======================================
Coverage 89.88% 89.89%
=======================================
Files 18 19 +1
Lines 4655 4659 +4
=======================================
+ Hits 4184 4188 +4
Misses 471 471
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@noxan would be amazing if you can review this PR. Should be a fast one. Thanks a lot! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - one note on this massive function to build the component plotting configuration (it is too massive) for a follow up and just wondering: would plot_utils.py
be a better name? Otherwise good to go from my side.
neuralprophet/utils_plot.py
Outdated
valid_configuration = { | ||
"components_list": plot_components, | ||
} | ||
return valid_configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At some point we should definitely refactor this method... also in parts related to #1004
@LeonieFreisinger let me know what you think and otherwise I'd merge it directly (possibly create follow up issues). |
PS: Congrats on securing pull request #1000 - 🎉 💯0 |
@noxan thanks for the fast review. Initially planned to name the module plot_utils.py. However, I aligned it with |
Thanks @LeonieFreisinger - good point about having consistent naming for our |
Model Benchmark
|
Congratulations @LeonieFreisinger you merged our #1000 th Pull Request! You won a free tour around Stanford campus! Please let me know your availability. |
definitely feel honored of saving PR1000. hahhaha @ourownstory almost as good as winning the lottery. |
Problem referring #965
Helper functions in plotting related files are defined in actual plotting files. This enlarges the file content.
Solution
Relocate plotting-related helper functions to a separate file
utils_plot.py
Key Changes:
utils_plot.py
utils_plot.py
Functions that were not relocated:
plot_trend_change(), plot_trend(), plot_daily(), plot_weekly(), plot_yearly(), plot_custom_season(), plot_lagged_weights(), plot_scalar_weights(), plot_forecast_component(), plot_multiforecast_component()