ProvTrack: Scientific Computing Workflow Manager
ProvTrack is a comprehensive, open-source workflow manager designed for scientific computing. It emphasizes provenance tracking as the central nervous system, ensuring full lineage of data, computations, and environments. Built on modern principles, it supports task abstractions for modularity, dataset versioning for immutability, reproducibility guarantees via hermetic execution, and collaboration spaces for team-based development.
Core Principles
- Provenance-First: Every artifact (data, task output, environment) is hashed (SHA-256) and linked in a directed acyclic graph (DAG) stored in a provenance database (e.g., Neo4j or PostgreSQL with graph extensions).
- Immutability: Datasets and outputs are append-only; versions are never overwritten.
- Reproducibility: Exact replay of any workflow run via pinned environments and seeds.
- Scalability: Distributed execution on Kubernetes, local, or cloud (AWS/GCP/Azure).
- Interoperability: Integrates with Jupyter, Git, DVC, MLflow, and standards like W3C PROV-O and Research Object (RO).
High-Level Architecture
[Collaboration Spaces] <-- Git-like VCS (Branching, Merging)
|
[Projects/Workspaces]
├── Tasks (Abstractions) ──> DAG Workflows
├── Datasets (Versioned Cache)
└── Runs (Provenance Graph + Artifacts)
|
[Execution Engine] (Containerized, Distributed)
├── Scheduler (DAGster/Airflow-inspired)
└── Runners (Docker/Podman + Singularity for HPC)
|
[Storage Layer]
├── Code Repo (Git)
├── Data Cache (S3-compatible + DVC-like .dvc files)
├── Provenance DB (Graph DB)
└── Metadata Store (PostgreSQL)
1. Task Abstractions
Tasks are first-class, composable units for encapsulating computations.
Key Features
-
Definition: YAML/JSON configs + code (Python/R/Julia/shell). Example:
task: preprocess_genome
inputs:
- dataset: raw_reads@v1.2 # Versioned ref
outputs:
- dataset: aligned_bam # Auto-versioned
code: |
def run(raw_reads):
# User code here
return aligned_bam
env: conda:biopython-1.79 # Pinned
resources: cpu=4, mem=16GB
random_seed: 42 # For reproducibility
-
Abstractions:
| Type | Description | Use Case |
|---|
| Atomic | Single function/script | Data cleaning |
| Composite | DAG of subtasks | ML pipeline |
| Parametrized | Hyperparams with sweeps | HPO (integrates Ray Tune) |
| Fan-out/Fan-in | Parallel map-reduce | Simulations |
-
Composition: Workflows as DAGs (visualized in UI with Cytoscape.js). Drag-and-drop editor.
2. Dataset Versioning
Immutable, content-addressable storage with human-readable tags.
Mechanism
3. Provenance Tracking
Full audit trail using a Provenance Graph.
Entities & Relations (W3C PROV Model)
- Entities: Datasets, Outputs, Environments.
- Activities: Task runs (with start/end times, host, PID).
- Agents: Users, tools.
- Relations:
used(in:dataset@vX), wasGeneratedBy(task@runY), wasDerivedFrom(parent).
- Capture: Automatic via hooks (e.g., Python decorators
@provtrack.task).
- Visualization: Interactive graph in UI (e.g., "Trace back why model_v3 failed").
- Export: PROV-N/JSON, RO bundles for sharing.
Example Graph Query (Cypher):
MATCH (output:Dataset {name: 'model_weights'})<-[:generated]-(run:Activity)
RETURN run, predecessors(run)
4. Reproducibility Guarantees
Zero-surprises replays.
Pillars
| Guarantee | Implementation |
|---|
| Environment | Docker/Singularity images auto-built from environment.yaml (conda/pip lockfiles). |
| Determinism | Fixed seeds, CUDA deterministic ops, sorted outputs. |
| Inputs | Pinned dataset versions; hash mismatch → error. |
| Replay | provtrack run replay <run_uuid> rebuilds exact env/DAG. |
| Verification | Post-run hash diffs; badges in UI (✅ Reproducible). |
| Caching | Intermediate results cached by input hash; invalidate on upstream change. |
- Challenges Addressed: Floating-point variance (via TF32/AMP pinning), external deps (mocked APIs).
5. Collaboration Spaces
Git-inspired, multi-tenant platform.
Structure
-
Spaces: Org-level (e.g., "LabX"). RBAC: Owner/Editor/Viewer.
-
Projects: Repos with workflows/datasets. Features:
| Feature | Description |
|---|
| Branching | Branch workflows/datasets; merge w/ conflict res. |
| Pull Requests | Review changes to DAGs/provenance. |
| Real-time Collab | Live editing (OT/Yjs), shared Jupyter kernels. |
| Sharing | Public RO bundles; DOI minting (via DataCite). |
| Triggers | CI/CD on push (e.g., auto-run on branch). |
| Audit Logs | Who changed what, when (immutable). |
-
UI/CLI: Web app (React + Dagster UI fork), CLI (provtrack space join labx/project).
Implementation Stack
- Backend: Python (FastAPI), Celery for tasks, SQLAlchemy + Neo4j.
- Frontend: React, Dagster UX.
- Storage: MinIO (data), Git (code).
- Execution: Kubernetes + Argo Workflows.
- Extensibility: Plugins for SLURM/HPC, custom tasks.
Getting Started
pip install provtrack
provtrack init myproject
provtrack task add preprocess.yaml
provtrack workflow run pipeline.dag
provtrack viz provenance --run latest
ProvTrack bridges the gap between ad-hoc notebooks and production pipelines, ensuring science is verifiable and collaborative. Open to contributions on GitHub (hypothetical: trailblazerlabs/provtrack). Questions? Let's iterate! 🕵️♂️