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

[lightning] Speed-up #973

Merged
merged 21 commits into from
Nov 30, 2022
Merged

[lightning] Speed-up #973

merged 21 commits into from
Nov 30, 2022

Conversation

karl-richter
Copy link
Collaborator

@karl-richter karl-richter commented Nov 17, 2022

work in progress, resolves #972

Ready from my side, follow up changes are in #999

@karl-richter karl-richter marked this pull request as draft November 17, 2022 19:41
@github-actions
Copy link

github-actions bot commented Nov 17, 2022

d6e4da3

Model Benchmark

Benchmark Metric main current diff
YosemiteTemps MAE_val 1.72948 1.72949 0.0%
YosemiteTemps RMSE_val 2.27386 2.27386 0.0%
YosemiteTemps Loss_val 0.00096 0.00096 0.0%
YosemiteTemps RegLoss_val 0 0 0.0%
YosemiteTemps epoch 84 84 0.0%
YosemiteTemps MAE 1.45189 1.45189 0.0%
YosemiteTemps RMSE 2.16631 2.16631 0.0%
YosemiteTemps Loss 0.00066 0.00066 0.0%
YosemiteTemps RegLoss 0 0 0.0%
YosemiteTemps time 153.24 100.07 -34.7%
PeytonManning MAE_val 0.64636 0.64636 0.0%
PeytonManning RMSE_val 0.79276 0.79276 0.0%
PeytonManning Loss_val 0.01494 0.01494 0.0%
PeytonManning RegLoss_val 0 0 0.0%
PeytonManning epoch 37 37 0.0%
PeytonManning MAE 0.42701 0.42701 0.0%
PeytonManning RMSE 0.57032 0.57032 0.0%
PeytonManning Loss 0.00635 0.00635 0.0%
PeytonManning RegLoss 0 0 0.0%
PeytonManning time 18.88 12.49 -33.85%
AirPassengers MAE_val 15.2698 15.2698 0.0%
AirPassengers RMSE_val 19.4209 19.4209 0.0%
AirPassengers Loss_val 0.00195 0.00195 0.0%
AirPassengers RegLoss_val 0 0 0.0%
AirPassengers epoch 89 89 0.0%
AirPassengers MAE 9.82902 9.82902 0.0%
AirPassengers RMSE 11.7005 11.7005 0.0%
AirPassengers Loss 0.00056 0.00056 0.0%
AirPassengers RegLoss 0 0 0.0%
AirPassengers time 7.2 4.78 -33.61%
Model training plots

Model Training

PeytonManning

YosemiteTemps

AirPassengers

@karl-richter karl-richter self-assigned this Nov 17, 2022
@codecov-commenter
Copy link

codecov-commenter commented Nov 17, 2022

Codecov Report

Merging #973 (d9d49a3) into main (9bf731a) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #973      +/-   ##
==========================================
+ Coverage   89.81%   89.83%   +0.02%     
==========================================
  Files          18       18              
  Lines        4632     4645      +13     
==========================================
+ Hits         4160     4173      +13     
  Misses        472      472              
Impacted Files Coverage Δ
neuralprophet/forecaster.py 88.01% <100.00%> (ø)
neuralprophet/logger.py 100.00% <100.00%> (ø)
neuralprophet/time_net.py 89.85% <100.00%> (-0.17%) ⬇️
neuralprophet/utils.py 80.79% <100.00%> (+0.73%) ⬆️

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

@karl-richter karl-richter added this to the Release 0.5.0 milestone Nov 18, 2022
@karl-richter
Copy link
Collaborator Author

@Kevin-Chen0 / everyone, lets please not update this branch with the main until we have the problem fixed - otherwise it becomes impossible for me to trace back what causes the performance overhead. Thanks!

@karl-richter
Copy link
Collaborator Author

karl-richter commented Nov 28, 2022

Times
92.64, 104.6
11.79, 12.61
4.49, 4.97

@noxan noxan marked this pull request as ready for review November 28, 2022 22:09
@karl-richter karl-richter added status: needs review PR needs to be reviewed by Reviewer(s) and removed help wanted labels Nov 29, 2022
Comment on lines +214 to +224
self.reg_enabled = utils.check_for_regularization(
[
config_season,
config_regressors,
config_lagged_regressors,
config_ar,
config_events,
config_trend,
config_holidays,
]
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Like the idea to check if regularization is enabled only once (instead of calling the regularization function with each iteration and figuring out it was not active) - yet we should only have one way to check if regularization is enabled or not - not multiple ones.

Copy link
Collaborator

@noxan noxan left a comment

Choose a reason for hiding this comment

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

Looks great, especially the performance improvements. There are some parts on the internals config flags of lightning I trust you on. Also one follow up issue would be to reduce our regularization checks to a single implementation again.

@noxan noxan added status: ready PR is ready to be merged and removed status: needs review PR needs to be reviewed by Reviewer(s) labels Nov 30, 2022
@karl-richter karl-richter merged commit d6e4da3 into main Nov 30, 2022
@karl-richter karl-richter deleted the fix/lightning_speedup branch November 30, 2022 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready PR is ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lightning slow training
4 participants