-
Notifications
You must be signed in to change notification settings - Fork 62
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
CStringStore
Unit tests write way too many logs
#302
Comments
Found the path that is causing this: In all of the tests a non-zero bucket delay is added: ml-cpp/lib/api/unittest/CStringStoreTest.cc Line 131 in 0328bdb
This trips this conditional: ml-cpp/lib/model/CAnomalyDetector.cc Lines 370 to 372 in 0328bdb
Which cuts the bucketLength in half. Then the following start/ends are off by half a bucket length and when: ml-cpp/lib/model/CAnomalyDetector.cc Lines 388 to 390 in 0328bdb
ml-cpp/lib/model/CAnomalyDetector.cc Lines 398 to 400 in 0328bdb
is called, certain models validate the sample times e.g ml-cpp/lib/model/CCountingModel.cc Lines 210 to 219 in 4dd90fa
Which calls: ml-cpp/lib/model/CBucketGatherer.cc Lines 450 to 453 in 0328bdb
I can make this stop by having CStringStoreTest not set the bucketDelay and let it use the default of 0. What say y'all @tveasey @droberts195 ? |
We need to check the code in more detail, so don't make any changes today, but since we do little/no testing with non-zero |
Based on this issue there's clearly a bug that's triggered if this option is used. Since it's undocumented my preference would be to change the code to completely remove it in 6.6. But before this is done, can you think of any reason to keep |
This was also for implementing out-of-phase analysis to mitigate bucketing partially sampling important features in the time series. However, I don't think that this is something we are going to prioritise reviving. I'm not sure it is worth the complexity and there is overlap the new multi-bucket functionality. Removing this also means we don't need result serialisation and various other code. I'd be +1 for cleaning this up now, especially since it appears to not be working correctly. |
Good point. If we get rid of I agree that they're less likely to be needed (and probably too complex to understand) now we have multi-bucket functionality. |
CStringStore unit tests write thousands of logs like the following:
We need to either fix the test or mute these particular logs when being ran from a unittest.
The text was updated successfully, but these errors were encountered: