Skip to content

slaclab/mlflow-cleanup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MLflow Cleanup Job

Automated Kubernetes CronJob to delete old MLflow runs from specific experiments, helping you manage storage space. Features

  • Automatically delete runs older than N days
  • Targets specific experiments
  • Safe - only touches experiments specified
  • Scheduled cleanup via Kubernetes CronJob
  • Containerized and easy to deploy

Quick Start

  1. Build & Push Image The Docker image is automatically built and pushed to GitHub Container Registry on every commit to main.

  2. Configure and edit configmap.yaml with your settings:

apiVersion: v1
kind: ConfigMap
metadata:
  name: mlflow-cleanup-config
  namespace: mlflow
data:
  DAYS_TO_KEEP: "7"                                    # Delete runs older than 7 days
  MLFLOW_TRACKING_URI: "http://mlflow-server:5000"   # Your MLflow server
  EXPERIMENTS_TO_CLEAN: "exp1,exp2,training-runs"    # Comma-separated experiment names
  1. Deploy
# Apply configuration
kubectl apply -f configmap.yaml

# Test with one-time job first
kubectl apply -f job.yaml
kubectl logs -l app=mlflow-cleanup

# Deploy scheduled cleanup (runs daily at 2 AM)
kubectl apply -f cronjob.yaml 

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors