Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

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

Closed
MichaelClifford opened this issue Jul 25, 2019 · 11 comments
Assignees
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@MichaelClifford
Copy link
Member

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
Copy link
Member Author

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 :

start_time=metric_start_time,
end_time=rolling_data_window,
chunk_size=None,
)
)
# If the training data downloaded is empty
if not train_data:
_LOGGER.error("No Metric data received, please check the data window size")
raise ValueError
# If more than one time-series match the given metric, raise an error
if len(train_data) > 1:
_LOGGER.error("Multiple timeseries matching %s were found")
_LOGGER.error("The timeseries matched were: ")
for timeseries in train_data:
print(timeseries.metric_name, timeseries.label_config)
_LOGGER.error("One metric should be specific to a single time-series")
raise ValueError
# Download test data
test_data_list = pc.get_metric_range_data(
metric_name=metric,
start_time=rolling_data_window,
chunk_size=str(Configuration.retraining_interval_minutes) + "m",

@4n4nd
Copy link
Contributor

4n4nd commented Jul 25, 2019

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

@MichaelClifford
Copy link
Member Author

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
Copy link
Contributor

4n4nd commented Jul 25, 2019

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
Copy link
Member Author

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
Copy link
Contributor

4n4nd commented Jul 25, 2019

Okay I will add,

  • FLT_DATA_START_TIME: Data start time
  • FLT_DATA_END_TIME: Data End time
  • FLT_ROLLING_TRAINING_WINDOW_SIZE: Training data window size
  • FLT_RETRAINING_INTERVAL_MINUTES: retraining interval/ forecasting duration

Are these var names good?

@goern
Copy link
Member

goern commented Mar 9, 2020

heya, what needs to be done to close this?

@sesheta
Copy link

sesheta commented Jul 1, 2021

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 sesheta added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 1, 2021
@sesheta
Copy link

sesheta commented Oct 12, 2021

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 sesheta added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Oct 12, 2021
@sesheta
Copy link

sesheta commented Nov 11, 2021

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

/close

@sesheta
Copy link

sesheta commented Nov 11, 2021

@sesheta: Closing this issue.

In response to this:

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. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@sesheta sesheta closed this as completed Nov 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

4 participants