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

Allow to strip training data for storage and memory reason on save for GlobalForecastingModel #2649

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

jonasblanc
Copy link

@jonasblanc jonasblanc commented Jan 21, 2025

Checklist before merging this PR:

  • Mentioned all issues that this PR fixes or addresses.
  • Summarized the updates of this PR under Summary.
  • Added an entry under Unreleased in the Changelog.

Fixes #1836 #2638

Summary

  • By specifying clean=True in GlobalForecastingModel.save(), it's now possible to save a cleaned model (ie. without training_series, past_covariate_series and future_covariate_series) helping to reduce the memory footprint of the saved model.
  • In the case of TorchForecastingModel.save() it additionally drops all the callback set to the model which were causing issue when trying to pickle the model.

Other Information

Copy link

codecov bot commented Jan 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.16%. Comparing base (c52ec83) to head (33755a7).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2649      +/-   ##
==========================================
- Coverage   94.20%   94.16%   -0.05%     
==========================================
  Files         141      141              
  Lines       15491    15509      +18     
==========================================
+ Hits        14594    14604      +10     
- Misses        897      905       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

Trained Model - new param allowing to strip training data for storage and memory reasons
1 participant