vfs.yaml Specification
1. Introduction
Section titled “1. Introduction”MedVFS (Medical Virtual Filesystem) is the data orchestration engine of the ColabBio platform. Its function is to act as an abstraction layer between heterogeneous hospital data systems (clinical databases, medical image servers, genomic repositories) and ML model training and validation containers.
The configuration for each execution is described in a single declarative file, vfs.yaml, which specifies:
- What data is needed (sources, queries, filters).
- How to access those sources (endpoints, authentication, secrets).
- Where to materialize the results (K8s PVC, local directory).
- How aggressive the extraction should be (parallelism, limits).
Design Philosophy
Section titled “Design Philosophy”- Declarative: All configuration lives in
vfs.yaml, zero code. - Data Agnostic: A single format for OMOP, FHIR, DICOM, WSI, and Genomics.
- Data doesn’t move: For image/genomic sources, manifests with paths are generated, not copies.
- Total Reproducibility: Each execution produces an immutable snapshot + a signable
manifest.json. - Sovereignty: Data never leaves the hospital perimeter; the model goes to the data.
- Secure by Default: Secrets are never in plain YAML; always referenced (
k8s://,env://).
2. Root Structure
Section titled “2. Root Structure”version: "1" # required — schema versionmetadata: # required — identifies the execution name: string namespace: string # optional — target K8s namespace run_id: string # optional — used as suffix in PVC/sandbox names
storage: # required — where to materialize outputs type: emptydir | hostpath | pvc host_path: string # if type=hostpath pvc_name: string # if type=pvc subpath: string # optional subdirectory within the volume output_dir: string # direct path override (dev/test)
setup: # required — execution control parallelism: int # max concurrent adapters (default: 4) fail_fast: bool # abort all on first error (default: false)
sources: # required — list of data sources - ... # (see below)
serve: # optional — serve mode configuration (FUSE daemon) fuse: mount_point: string # FUSE mount path (e.g. /data/vfs) cache_dir: string # block cache directory cache_max_gb: int # max cache size in GB (default: 50) block_size_mb: int # block size in MB (default: 4) prefetch: # prefetch engine config enabled: bool strategy: string # sequential | format_aware | manifest read_ahead_blocks: int # L1 read ahead blocks concurrent_fetchers: int # parallel workers warmup_percent: int # L3 warmup percentage http: port: int # HTTP API port (default: 8090) live_monitoring: bool # enable streaming adapters (fsnotify)
mount: # required — ML container mount config path: string # base path where external container will see data readonly: bool # true in external execution sandbox3. Adapters Overview
Section titled “3. Adapters Overview”Adapter (type) |
Protocol | Source | Output |
|---|---|---|---|
sql |
SQL (pgx) | Generic PostgreSQL / Cloud SQL | CSV with query rows |
bigquery |
Google Cloud BigQuery API | BigQuery / NCI IDC / ISB-CGC | CSV with analytical query results |
omop |
SQL (pgx) | OMOP CDM PostgreSQL | CSV with query rows |
fhir |
FHIR R4 REST | HAPI FHIR / Any FHIR server | CSV with flattened fields |
omero |
OMERO.web API | OMERO Server (WSI) | CSV metadata + PNG thumbnails |
orthanc |
DICOMweb | Orthanc / PACS | CSV studies + JSON series manifests |
genomics |
NFS / GCS / S3 | Genomic Filesystem | CSV manifest with validated paths |
dicom |
Local Scanner | Local DICOM Receiver | CSV + FUSE Symlink Tree |
files |
Local / NFS / GCS / S3 | Object Storage & Buckets | Virtualized FUSE tree / symlinks |
4. Generic SQL & Cloud SQL (type: sql)
Section titled “4. Generic SQL & Cloud SQL (type: sql)”Executes standard SQL queries against PostgreSQL and Google Cloud SQL databases without requiring the OMOP CDM schema:
sources: - id: clinical_records type: sql sql: driver: postgres # default: postgres (supports Cloud SQL & standard PostgreSQL) dsn_secret: "k8s://colabbio-prod/db-secrets/cloudsql-dsn" # or dsn: in dev query: | SELECT patient_id, age, isup_grade, psa_level FROM hospital_prostate_cohort WHERE biopsy_date >= '2022-01-01' materialize: output: clinical/patients.csv format: csv5. Google Cloud BigQuery (type: bigquery)
Section titled “5. Google Cloud BigQuery (type: bigquery)”Connects directly to Google Cloud BigQuery datasets, enabling seamless joins across institutional data lakes and public cancer research resources (like NCI IDC and ISB-CGC) with zero ETL pipelines:
sources: - id: tcga_prad_cohort type: bigquery bigquery: project_id: my-gcp-project # Optional if GOOGLE_CLOUD_PROJECT is set location: "US" query: | SELECT b.PatientID AS patient_id, b.gcs_url AS slide_gcs_url, c.gleason_score, c.ajcc_pathologic_tumor_stage AS stage, c.days_to_first_biochemical_recurrence, c.biochemical_recurrence_full AS bcr_status, LOGICAL_OR(m.Hugo_Symbol IN ('BRCA1', 'BRCA2', 'ATM', 'CDK12')) AS hrd_ddr_mutated, LOGICAL_OR(m.Hugo_Symbol = 'PTEN') AS pten_mutated FROM `bigquery-public-data.idc_current.dicom_all` b JOIN `isb-cgc-bq.tcga_clinical_v0.clinical_PRAD` c ON b.PatientID = c.submitter_id LEFT JOIN `isb-cgc-bq.tcga_mc3_v0.mc3_PRAD` m ON b.PatientID = m.Tumor_Sample_Barcode WHERE b.collection_id = 'tcga_prad' AND b.Modality = 'SM' GROUP BY 1, 2, 3, 4, 5, 6 materialize: output: clinical/tcga_prad_cohort.csv format: csv