prio-data / views_pipeline

VIEWS forecasting pipeline for monthly prediction runs. Includes MLops and QA for all models/ensembles.
Other
3 stars 3 forks source link

Enforce Deprecation of Old Models and Prevent Ensemble Inclusion #107

Open Polichinel opened 2 weeks ago

Polichinel commented 2 weeks ago

Issue: Enforce Deprecation of Old Models and Prevent Ensemble Inclusion

Description
Ensure that deprecated models are flagged and restricted from ensemble use, supporting model integrity and lifecycle management within the pipeline. Deprecated models will be archived for record-keeping without deletion, and ensembles containing deprecated models will be prevented from running to maintain reliability. NOTE: the ensembles should not execute - the user must be made aware that something is very wrong here: fail first philosophy

Objectives and Requirements

  1. Deployment Status Update:

    • Set the deployment status of each deprecated model to "deprecated" within views_pipeline/models/[model]/config_deployment.py and views_pipeline/ensembles/[ensemble]/config_deployment.py.
    • The "deprecated" status should serve as the definitive indicator that a model is retired from all operational use. Reflect this in the project documentation to ensure consistent understanding across the team.
  2. Archive Models without Deletion:

    • By archive, we simply mean that deprecated models are left in the existing model directories but with no way of being executed
    • Ideally, the model's main.py should simply not be able to execute if the model is flagged as deprecated.
  3. Ensemble Execution Block:

    • Implement the ensemble execution check at the earliest stage possible. If a deprecated model is included within an ensemble:
      • Halt the ensemble’s execution.
      • Log a clear, actionable error message indicating that the ensemble did not execute because it includes a deprecated model ([model_name]). The log should include the model’s deprecation status and instructions for removing the deprecated model from the ensemble configuration.

Tasks

Next Steps
After completing the deprecation process, review all model and ensembles main.py (or whichever script was use to enforce this in the end) to ensure compliance. Consider setting up routine checks or alerts to monitor for deprecated models within ensembles, ensuring sustained compliance with the deprecation policy.

Labels
deprecation, model lifecycle, ensemble, error handling