-
Notifications
You must be signed in to change notification settings - Fork 65
[ML] Feature/forecast scale #89
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
[ML] Feature/forecast scale #89
Conversation
This implements the C++ side of forecast persistence. An additional parameter allows the forecast runner to persist models on disk for temporary purposes. Models are loaded back into memory one by one. For models smaller than the current limit of 20MB nothing changes.
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 subject to a few nits
include/api/CForecastRunner.h
Outdated
|
||
// Note: This value measures the size in memory, not the size of the persistence, | ||
// which is likely higher and would be hard to calculate upfront | ||
//! max memory allowed to use for forecast models persisting to disk |
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.
Only the last line of this begins with //!
. All the lines should be consistent.
include/api/CForecastRunner.h
Outdated
// if you change this value also change the limit on X-pack side. | ||
// The purpose of this value is to guard the rest of the system regarding | ||
// an out of disk space | ||
//! minimum disk space required for disk persistence |
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.
Only the last line of this begins with //!
. All the lines should be consistent.
include/model/CModelFactory.h
Outdated
@@ -351,6 +351,9 @@ class MODEL_EXPORT CModelFactory { | |||
//! component. | |||
std::size_t componentSize() const; | |||
|
|||
// Get the minimum seasonal variance scale, specific to the model |
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.
Should be a Doxygen comment
lib/api/CForecastRunner.cc
Outdated
series.s_ToForecast.emplace_back( | ||
feature, std::move(model), byFieldValue); | ||
} else // restorer exhausted, no need for further restoring | ||
{ |
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.
nit: could move {
after else
but before comment
This implements the C++ side of forecast persistence. An additional parameter allows the forecast runner to persist models on disk for temporary purposes. Models are loaded back into memory one by one.
This implements forecast model cloning overflowing to disk to allow forecasting of large jobs. The tmp storage location has to be given as parameter (X-Pack change: elastic/elasticsearch#30399). If the parameter is not given, this feature is disabled. For models smaller than the existing limit (20MB) nothing changes.
Todo:
To be merged together once corresponding X-Pack PR and this PR are ready.
Release note: Forecasting of large machine learning jobs is now supported by temporarily storing
model state on disk