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] Prevent adding new seasonal and calendar components to comply with hard limit #2469
Conversation
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.
Overall looks good. I think there is a gotcha though in using unsigned arithmetic to compute extra memory.
@tveasey Thank you for your comments. I addressed all of them. It would be great if you could take another look. |
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!
lib/model/CEventRateModel.cc
Outdated
@@ -365,6 +366,8 @@ void CEventRateModel::sample(core_t::TTime startTime, | |||
annotationCallback(annotation); | |||
}); | |||
|
|||
params.memoryCircuitBreaker(CMemoryCircuitBreaker(resourceMonitor)); |
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: couldn't this just be appended to the list above?
@@ -525,6 +526,7 @@ void CEventRatePopulationModel::sample(core_t::TTime startTime, | |||
LOG_TRACE(<< "Model unexpectedly null"); | |||
continue; | |||
} | |||
params.memoryCircuitBreaker(CMemoryCircuitBreaker(resourceMonitor)); |
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: as before.
retest |
This PR improves anomaly detection job compliance with the hard memory limit. It does this by ensuring that the anomaly detection job does not add new seasonal and calendar components to the probability model while it is in the
hard_limit
state.See also #373.