Skip to content

[FR] Run mlflow gc based on time since last deletion #6128

@Jason-CKY

Description

@Jason-CKY

Willingness to contribute

Yes. I would be willing to contribute this feature with guidance from the MLflow community.

Proposal Summary

Adding more functionality to mlflow gc, where administrators can delete runs based on time criteria (e.g. delete runs that have been tagged as deleted > 1 month ago). This could be done by adding a delete_date column into runs table in the sqlstore.

Motivation

What is the use case for this feature?

Sometimes developers would want to restore their runs that they previously deleted, so just running mlflow gc to delete all deleted runs periodically might cause developers to lose their data. By being able to delete runs that have been deleted for some time, we can be more sure that the deleted run is no longer needed.

Why is this use case valuable to support for MLflow users in general?

Sometimes developers would want to restore their runs that they previously deleted, so just running mlflow gc to delete all deleted runs periodically might cause developers to lose their data. By being able to delete runs that have been deleted for some time, we can be more sure that the deleted run is no longer needed.

Why is this use case valuable to support for your project(s) or organization?

Sometimes developers would want to restore their runs that they previously deleted, so just running mlflow gc to delete all deleted runs periodically might cause developers to lose their data. By being able to delete runs that have been deleted for some time, we can be more sure that the deleted run is no longer needed.

Why is it currently difficult to achieve this use case?

runs table only have start_time and end_time column that tracks when the run is created and finished. However, it does not track when the run is deleted so it is impossible to delete based on this criteria.

Details

No response

What component(s) does this bug affect?

  • area/artifacts: Artifact stores and artifact logging
  • area/build: Build and test infrastructure for MLflow
  • area/docs: MLflow documentation pages
  • area/examples: Example code
  • area/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registry
  • area/models: MLmodel format, model serialization/deserialization, flavors
  • area/projects: MLproject format, project running backends
  • area/scoring: MLflow Model server, model deployment tools, Spark UDFs
  • area/server-infra: MLflow Tracking server backend
  • area/tracking: Tracking Service, tracking client APIs, autologging

What interface(s) does this bug affect?

  • area/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev server
  • area/docker: Docker use across MLflow's components, such as MLflow Projects and MLflow Models
  • area/sqlalchemy: Use of SQLAlchemy in the Tracking Service or Model Registry
  • area/windows: Windows support

What language(s) does this bug affect?

  • language/r: R APIs and clients
  • language/java: Java APIs and clients
  • language/new: Proposals for new client languages

What integration(s) does this bug affect?

  • integrations/azure: Azure and Azure ML integrations
  • integrations/sagemaker: SageMaker integrations
  • integrations/databricks: Databricks integrations

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/sqlalchemyUse of SQL alchemy in tracking service or model registryenhancementNew feature or requesthas-closing-prThis issue has a closing PR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions