nirs4all.pipeline.storage.store_schema module

SQLite schema definitions for the workspace store.

Defines the table schema used by WorkspaceStore: runs, pipelines, chains, predictions, artifacts, logs, projects, conformal_results, tuning_results and robustness_results.

Dense prediction arrays (y_true, y_pred, etc.) are stored in Parquet sidecar files managed by ArrayStore, not in SQLite.

The schema uses IF NOT EXISTS for all DDL statements, making create_schema() safe to call repeatedly (idempotent).

nirs4all.pipeline.storage.store_schema.REFIT_CONTEXT_STACKING: str = 'stacking'

Refit context for a stacking-context refit (base model inside a stack).

nirs4all.pipeline.storage.store_schema.REFIT_CONTEXT_STANDALONE: str = 'standalone'

Refit context for a standalone refit (single model, no stacking).

nirs4all.pipeline.storage.store_schema.create_schema(conn: Connection) → None[source]

Create or migrate the schema atomically; current stores require no DDL.

Independent readers keep seeing the previous committed view while a migration runs. Concurrent initializers serialize only when schema work is needed. A caller’s existing transaction is preserved with a savepoint, never committed.