π Experiment Tracking
Transparent dual-write tracking β every metric, parameter, and artifact is automatically logged to FlowyML and your external tracker.
π MLflow π Weights & Biases πΎ SQLite π Auto-Sync
π Experiment Tracking
What you'll learn
How FlowyML's transparent dual-write tracking works β automatic metric/parameter forwarding to both the internal dashboard and external trackers like MLflow and WandB.
How It Works
FlowyML implements dual-write tracking: every pipeline run automatically writes to two destinations:
graph LR
A[Pipeline.run] --> B[FlowyML Internal Store]
A --> C[External Tracker]
B --> D[FlowyML UI Dashboard]
C --> E[MLflow / WandB UI]
| Destination | Purpose | Always Active |
|---|---|---|
| FlowyML Internal (SQLite) | Powers the FlowyML UI dashboard | β Always |
| External Tracker (MLflow/WandB) | Team-wide experiment management | Configured via stack |
Zero-Config Setup
Tracking is enabled by default. Every pipeline run automatically logs:
from flowyml import Pipeline, step
from flowyml.assets import Metrics
@step
def evaluate(ctx):
accuracy = 0.95
# Metrics assets are auto-logged to BOTH stores
return Metrics({"accuracy": accuracy, "f1": 0.93})
pipeline = Pipeline("training")
pipeline.add_step(evaluate)
pipeline.run()
# β Metrics logged to FlowyML internal store
# β Metrics forwarded to configured external tracker
Stack Configuration
MLflow
# flowyml.yaml
stacks:
prod:
tracking:
experiment_tracker: mlflow
mlflow_uri: https://mlflow.company.com
mlflow_experiment: fraud-detection
Weights & Biases
stacks:
prod:
tracking:
experiment_tracker: wandb
wandb_project: fraud-detection
wandb_entity: ml-team
What Gets Tracked
Automatic (zero code changes)
| Data | Internal Store | External Tracker |
|---|---|---|
| Run metadata (ID, name, status, timestamps) | β | β |
| Pipeline parameters (Context) | β | β |
Metrics asset values |
β | β |
| Step durations | β | β |
| Run status transitions | β | β |
Via Step Code
@step
def train(ctx: Context):
# Log custom metrics β auto-forwarded to external tracker
ctx.log_metric("learning_rate", 0.001)
ctx.log_metric("batch_size", 32)
ctx.log_params({"optimizer": "adam", "epochs": 50})
Pipeline Integration
The tracking lifecycle is managed by PipelinePluginIntegration:
sequenceDiagram
participant P as Pipeline.run()
participant I as Internal Store
participant E as External Tracker
P->>I: Create run record
P->>E: Start external run
loop Each Step
P->>I: Log step metrics
P->>E: Forward metrics
end
P->>I: Finalize run
P->>E: End external run
Control Tracking
# Enable/disable tracking per pipeline
pipeline = Pipeline("training", enable_experiment_tracking=True) # default
pipeline = Pipeline("quick-test", enable_experiment_tracking=False) # disable
# Or via config
# flowyml.yaml
# config:
# auto_log_metrics: true # default
Viewing Results
FlowyML UI Dashboard
# Start the FlowyML UI
flowyml ui start
# Navigate to:
# β Dashboard: overview of all runs
# β Experiments: compare metrics across runs
# β Runs: detailed step-by-step view
External Tracker UI
- MLflow: Navigate to your
mlflow_urito see runs, metrics, and artifacts - WandB: Visit
wandb.ai/<entity>/<project>for interactive dashboards
Both Simultaneously
The dual-write ensures your team can use whichever UI they prefer β FlowyML for pipeline-centric views, MLflow/WandB for experiment-centric analysis.
Tracker Resolution
The external tracker is resolved from your stack configuration:
Pipeline(stack="prod")
βββ Stack.tracking.experiment_tracker = "mlflow"
βββ MLflowTracker(uri="https://mlflow.company.com")
βββ Auto-starts run at Pipeline.run()
βββ Auto-forwards metrics from Metrics assets
βββ Auto-ends run on completion
If no tracker is configured, only the internal store is used (FlowyML UI still works).
Best Practices
Always use the internal store
The FlowyML internal store is always active and powers the UI dashboard. Don't disable it β it has zero overhead.
Use MLflow for team collaboration
MLflow's tracking server provides a shared view of all experiments. Deploy it centrally for team-wide visibility.
Tracker failures are non-fatal
If the external tracker is unreachable, the pipeline still runs and logs to the internal store. Check logs for tracker connection warnings.
Compare across trackers
Use the FlowyML UI for pipeline-level comparison (DAG, steps, timing) and MLflow/WandB for metric-level analysis (curves, distributions).