AICoE / prometheus-anomaly-detector

A newer more updated version of the prometheus anomaly detector (https://github.com/AICoE/prometheus-anomaly-detector-legacy)
GNU General Public License v3.0
597 stars 151 forks source link

test_model should give the user ability to define date and time of testing interval #34

Closed MichaelClifford closed 3 years ago

MichaelClifford commented 5 years ago

test_model.py should include options that allow a user to dictate the exact start and end time of their testing window.

Current implementation takes rolling data window size in days and the current time automatically. This is an OK default, but we should also give the user the ability to specify specific time periods where they know an anomaly has occurred for testing purposes.

MichaelClifford commented 5 years ago

To address @4n4nd's request in #35, below are the specific inputs we should add in our .env to achieve a user defined time range.

FLT_TEST_START_TIME = " " FLT_TEST_END_TIME = " "

These two values will dictate the start_time and end_time for the data downloaded when running test_model.py :https://github.com/AICoE/prometheus-anomaly-detector/blob/4f942677f347ea9aea122e3aebb4331b070a6ac2/test_model.py#L70-L94

4n4nd commented 5 years ago

Does it test on all this test data once? or do we specify a training interval?

MichaelClifford commented 5 years ago

So I think we still specify the training interval. It should be the same value as FLT_ROLLING_DATA_WINDOW. maybe this could be renamed for clarity? maybe FLT_ROLLING_TRAINING_WINDOW?

4n4nd commented 5 years ago

okay FLT_ROLLING_TRAINING_WINDOW sounds good.

FLT_TEST_START_TIME and FLT_TEST_END_TIME specify the total test data and FLT_RETRAINING_INTERVAL is the interval for training?

and maybe FLT_TRAIN_START_TIME and FLT_TRAIN_END_TIME as well?

MichaelClifford commented 5 years ago

Yes, FLT_TEST_START_TIME and FLT_TEST_END_TIME should specify the total data used by model_test.py.

FLT_RETRAINING_INTERVAL_MINUTES should specify the prediction range for the test (how far into the future we will forecast after each retraining) , as it represents how frequently we will retrain the model on the FLT_ROLLING_TRAINING_WINDOW timeframe and then make our forecast up to the next retraining.

I don't think we need FLT_TRAIN_START_TIME and FLT_TRAIN_END_TIME.

4n4nd commented 5 years ago

Okay I will add,

Are these var names good?

goern commented 4 years ago

heya, what needs to be done to close this?

sesheta commented 3 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

/lifecycle stale

sesheta commented 3 years ago

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

/lifecycle rotten

sesheta commented 3 years ago

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen. Mark the issue as fresh with /remove-lifecycle rotten.

/close

sesheta commented 3 years ago

@sesheta: Closing this issue.

In response to [this](https://github.com/AICoE/prometheus-anomaly-detector/issues/34#issuecomment-966251110): >Rotten issues close after 30d of inactivity. >Reopen the issue with `/reopen`. >Mark the issue as fresh with `/remove-lifecycle rotten`. > >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.