Skip to content

mlflow integration#767

Open
samhita-alla wants to merge 6 commits intomainfrom
mlflow-integration
Open

mlflow integration#767
samhita-alla wants to merge 6 commits intomainfrom
mlflow-integration

Conversation

@samhita-alla
Copy link
Contributor

@samhita-alla samhita-alla commented Mar 9, 2026

Summary

  • New flyteplugins-mlflow plugin that integrates MLflow experiment tracking with Flyte tasks via a @mlflow_run decorator
  • Supports automatic run management, autologging, parent/child run sharing, nested runs (cross-container), distributed training (rank-gated logging), and auto-generated MLflow UI links
  • Includes configuration management via mlflow_config() for workflow-level defaults and per-task overrides

Run modes

  • auto (default): Reuse parent's MLflow run if available, otherwise create a new one
  • new: Always create an independent run
  • nested: Create a new run with mlflow.parentRunId tag linking it to the parent. This works across tasks without needing the parent run active in the same process.

Key features

  • Autologging: @mlflow_run(autolog=True, framework="sklearn") enables MLflow autologging with optional framework targeting
  • Distributed training: Auto-detects RANK env var; only rank 0 logs to MLflow
  • Link auto-generation: mlflow_config(link_host=...) generates MLflow UI URLs that propagate to child tasks with links=(Mlflow(),)
  • Local execution: Handles MLflow's active run stack correctly when parent and child tasks share a process

Signed-off-by: Samhita Alla <aallasamhita@gmail.com>
Signed-off-by: Samhita Alla <aallasamhita@gmail.com>
Signed-off-by: Samhita Alla <aallasamhita@gmail.com>
Signed-off-by: Samhita Alla <aallasamhita@gmail.com>
@samhita-alla samhita-alla marked this pull request as ready for review March 9, 2026 11:01
@cosmicBboy
Copy link
Contributor

@samhita-alla let's add the mlflow plugin to the publish.yaml CI https://github.com/flyteorg/flyte-sdk/blob/main/.github/workflows/publish.yml

Signed-off-by: Samhita Alla <aallasamhita@gmail.com>
Signed-off-by: Samhita Alla <aallasamhita@gmail.com>
@samhita-alla
Copy link
Contributor Author

@cosmicBboy i keep forgetting. sorry about that. it should be added now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants