Flow with FlorDB: Incremental Context Maintenance for the Machine Learning Lifecycle

Rolando Garcia, Chithra Anand, Sarah E. Chasins, Joseph M. Hellerstein, Aditya G. Parameswaran

Introduction

The machine learning (ML) lifecycle is plagued by a persistent tension between development agility and operational discipline. To ensure reproducibility and debuggability, practitioners are often urged to maintain rigorous, up-front documentation of experiments, data versions, and model parameters. However, in the early, exploratory stages of a project, the overhead of comprehensive metadata management frequently stifles progress. This often leads to a "metadata crisis" where developers move quickly without logging, only to find themselves unable to reconstruct critical context from past runs without expensive, full re-executions.

FlorDB addresses this challenge by introducing a "metadata later" philosophy. By treating metadata as a resource that can be harvested incrementally and retroactively, FlorDB allows developers to maintain agility while achieving the discipline required for production-grade MLOps.

System Architecture and Methodology

FlorDB is designed to treat the entire execution history of a pipeline as a queryable metadata store. Its architecture is built around several core innovations:

Multiversion Hindsight Logging

The centerpiece of FlorDB is "hindsight logging." This mechanism allows developers to retroactively extract variables from past pipeline runs. If a developer realizes a crucial metric was not recorded, they can simply add a flor.log statement to their code. FlorDB uses code diffing to inject this statement into previous versions of the script and executes it across those versions.

Incremental Replay and the ABCs of Context

To minimize the computational cost of retroactive logging, FlorDB employs incremental replay. By leveraging memoization and parallelism, the system re-executes only the necessary segments of a pipeline to capture the new metadata. The system categorizes context into three primary dimensions:

  1. Application Context: Captured via standard log statements (e.g., hyperparameters, metrics).
  2. Behavioral Context: Captured through build files like Makefiles, defining how data flows between stages.
  3. Change Context: Integrated with Git to track the evolution of code and data.

Relational API

FlorDB automatically pivots captured logs into a tabular format, accessible via the flor.dataframe API. This transforms unstructured logs into a unified, relational view that can be queried using standard data science tools like Pandas or SQL.

FlorDB's logging API and the resulting relational dataframe for a document processing pipeline.

Case Study: Document Intelligence Pipeline

The utility of FlorDB is demonstrated through a complex PDF parsing pipeline. This "Document Intelligence" use case involves processing diverse legal and public health documents through OCR, NLP featurization, and model training. The pipeline also includes a human-in-the-loop Flask application for feedback. FlorDB manages this asynchronous, multi-stage process through its simple logging interface, allowing researchers to track everything from raw text extraction to human-validated labels without specialized silos like separate feature stores or model registries.

Key Insights: Unified Abstraction

A core thesis of FlorDB is that specialized MLOps tools—such as model registries, feature stores, and experiment trackers—are essentially specific views of a project's broader context. By providing a single, flexible relational abstraction, FlorDB can serve as a drop-in replacement for these fragmented systems.

Integration of behavioral context (Makefile) and application context across the ML lifecycle stages of training, inference, and deployment.

This unification democratizes high-quality MLOps, making rigorous tracking accessible to resource-constrained teams, such as investigative journalists or social justice researchers, who may lack the infrastructure to support a complex suite of bespoke tools.

Results and Future Work

Qualitative evaluations show that FlorDB successfully back-propagates metadata discipline into early project versions. Developers can start with minimal logging and incrementally build a comprehensive model registry post-hoc. Operational efficiency is maintained through incremental replay, significantly reducing the overhead of metadata recovery compared to full pipeline re-runs.

Future work includes conducting formal user studies to validate the "metadata later" workflow's usability and integrating FlorDB with industry-standard orchestrators like Airflow or Kubeflow. Additionally, the team aims to explore the scaling limits of hindsight logging on multi-petabyte datasets.

Summary updated

BibTeX
@inproceedings{garcia2025flow,
  author = {Rolando Garcia and Chithra Anand and Sarah E. Chasins and Joseph M. Hellerstein and Aditya G. Parameswaran},
  title = {{Flow with FlorDB: Incremental Context Maintenance for the Machine Learning Lifecycle}},
  booktitle = {CIDR},
  year = {2025},
}
Figure