Tutorials › Pharmacometric Workflows and Reproducible Modeling › Creating Run Manifests

Run Management and Model Comparison · Tutorial 172 of 399

Creating Run Manifests

Build a clear, validated manifest that lets collaborators identify the inputs and execution details associated with a pharmacometric model run.

Intermediate 10 min read

What You'll Learn

  • Define the role and boundaries of a run manifest.
  • Choose unambiguous fields for model, data, configuration, software, start time, operator, and output locations.
  • Represent manifest records as valid, machine-readable JSON.
  • Distinguish an input reference from the input itself, and use digests to detect mismatches.
  • Validate required fields, types, timestamps, and paths before execution.
  • Diagnose common omissions and design a manifest that supports later review.

Why a Run Needs a Manifest

A model run is more than an estimate or an output file. To interpret or reproduce it, a reviewer needs to know which model and inputs were used, which software ran them, who or what initiated the run, when it started, and where its outputs were written. If these details are scattered across filenames, shell history, and personal notes, it is easy to confuse one run with another.

A run manifest puts these details in one structured, machine-readable record. It is useful both to a person reviewing a result and to software that checks, indexes, or summarizes runs. A manifest does not itself prove that a run succeeded, preserve every artifact, or capture every detail of the execution environment. It records the specified facts and references in a consistent form; those other responsibilities require separate workflow steps.

Definition: A run manifest is a structured record associated with one model run that identifies the run and records its model, data, configuration, software, start time, operator, and output locations. A well-designed manifest uses defined field names and types, consistent representations, and explicit rules for required and optional values.

Designing the Record

Start with the questions a reader must be able to answer. Which run is this? Which model, data, and configuration were used? Which software was invoked? When did execution start, and who or what initiated it? Where should its outputs be found? Each answer should have a designated field rather than being inferred from a filename or a directory name.

Use the stable run identifier established for the workflow as the manifest's run identifier. Do not make the identifier do the work of the manifest: a compact identifier may help locate a run, but it cannot reliably encode every input, software version, or output path. In particular, avoid interpreting an identifier by splitting it into tokens unless its format explicitly defines that behavior.

Manifest fieldWhat it recordsDesign consideration
schema_versionVersion of the manifest structureAllows software to interpret fields consistently when the schema changes.
run_idStable identifier for this runMust identify this run unambiguously within the workflow.
modelModel file or model package referenceRecord a path or URI and, where available, a content digest or version label.
dataAnalysis-data referenceIdentify the exact input dataset; do not place sensitive records in the manifest.
configurationRun-control or estimation-settings referenceIdentify the configuration actually supplied to the run.
softwareSoftware name and version used to run the modelRecord a precise version where known; detailed execution-environment capture is a separate concern.
started_atRun start timestampUse an unambiguous time standard and representation, such as ISO 8601 in UTC.
operatorPerson or service account that initiated the runUse an agreed identifier, not an ambiguous display name alone.
outputsLocations intended for the run's outputsName output roles and record paths or URIs, not just a generic folder.

A path is a reference, not the content of a file. Relative paths are compact, but their meaning depends on a documented base directory; absolute paths avoid that ambiguity on one system but may not resolve on another. A URI can be appropriate for a shared storage location. Choose a convention and apply it consistently. If a digest is recorded, specify its algorithm and the exact file bytes to which it applies. A digest can help detect a mismatch; it does not make the referenced file available.

For timestamps, include a timezone. A value such as 2026-05-12 09:30 is ambiguous because it does not say whether the time is UTC or local time. A value such as 2026-05-12T09:30:00Z identifies a UTC instant. For output locations, named roles such as estimates, log, and diagnostics are more informative than a single field called output.

Key design rule: The manifest should describe one run, refer to the exact inputs and configuration used, and make each field interpretable without guessing. Keep the schema definition separate from individual manifest values, and record a schema version so readers know how to parse the record.

Why Explicit Fields Improve Traceability

The minimum field set follows from the questions needed to distinguish and review a run. If the model reference is absent, a reader cannot identify the model input. If the data or configuration reference is absent, the model input alone does not determine the analysis that was run. If the software, start time, or operator is absent, those execution facts cannot be recovered reliably from the model and input references. If outputs are not located explicitly, a reviewer must guess where to look. Thus each required field closes a different information gap; duplicating information in a filename does not close a gap unless the filename convention is itself defined, stable, and parsed consistently.

This reasoning also explains why references should be specific. Suppose two files are both called analysis.csv. The filename alone does not identify which data were used. A path narrows the reference; a content digest can further distinguish files that happen to share a name. The same principle applies to a model or configuration. The manifest becomes useful when its references resolve to the intended objects under the workflow's stated conventions.

1
Define the schema.
Specify required fields, types, timestamp format, path convention, and whether each field can be null.
2
Collect run-specific values.
Resolve the model, data, configuration, software version, operator, start time, and output locations for this run.
3
Serialize and validate.
Write a valid machine-readable record, then check syntax, required fields, types, and references before relying on it.

Worked Manifest Examples

Worked Example: Recording One Hypothetical Run

A hypothetical pharmacometric analysis is launched on 12 May 2026. The run identifier is RUN-2026-0512-03. The model file is models/one_compartment.mod, the input data are data/analysis.csv, and the configuration is config/focei.yaml. Software NLME-X version 4.2.1 is used. The run is initiated by service account pm-batch-02. Its estimates, log, and diagnostics are written to results/RUN-2026-0512-03/.

Assume the workflow defines paths relative to the project root and requires UTC timestamps. A valid compact JSON manifest is:

Manifest: {"schema_version":"1.0","run_id":"RUN-2026-0512-03","model":{"path":"models/one_compartment.mod"},"data":{"path":"data/analysis.csv"},"configuration":{"path":"config/focei.yaml"},"software":{"name":"NLME-X","version":"4.2.1"},"started_at":"2026-05-12T09:30:00Z","operator":"pm-batch-02","outputs":{"estimates":"results/RUN-2026-0512-03/estimates.csv","log":"results/RUN-2026-0512-03/run.log","diagnostics":"results/RUN-2026-0512-03/diagnostics.pdf"}}

The fields identify each required category, and the outputs are distinct named locations. The timestamp has a UTC indicator. Since this hypothetical schema defines project-root-relative paths, the paths have a consistent interpretation. The record describes where the outputs are expected; it does not assert that those files already exist or that the run completed.

Worked Example: Adding Input Digests

A second hypothetical run uses model file models/two_compartment.mod, data file data/analysis.csv, and configuration config/focei.yaml. The workflow computes SHA-256 digests for the exact files supplied to the run: model digest a1b2, data digest c3d4, and configuration digest e5f6. These short values are illustrative placeholders, not complete SHA-256 digests. In a real record, each digest must contain the full value.

The manifest can associate each reference with its digest: {"schema_version":"1.0","run_id":"RUN-2026-0512-04","model":{"path":"models/two_compartment.mod","sha256":"a1b2"},"data":{"path":"data/analysis.csv","sha256":"c3d4"},"configuration":{"path":"config/focei.yaml","sha256":"e5f6"},"software":{"name":"NLME-X","version":"4.2.1"},"started_at":"2026-05-12T10:15:00Z","operator":"analyst-17","outputs":{"estimates":"results/RUN-2026-0512-04/estimates.csv","log":"results/RUN-2026-0512-04/run.log"}}

The manifest now distinguishes the inputs by both location and recorded content identity. If a later file at one of these paths has a different digest, it is not the same byte content as the input identified here. This check depends on computing the digest over the correct file and recording the full digest; a truncated placeholder would not provide a reliable content check.

Worked Example: Repairing an Ambiguous Manifest

Consider a hypothetical draft record: {"run_id":"trial3","model":"model.mod","data":"data.csv","software":"latest","started_at":"May 12, 9:30","operator":"Sam","outputs":"out"}. The run directory is not specified, the data and model paths may be ambiguous, the software version is not identifiable, the timestamp has no year or timezone, the operator is only a display name, and output roles are not distinguished.

Suppose the actual project root is /work/pkstudy, the software is NLME-X 4.2.1, the run began at 09:30 UTC on 12 May 2026, the operator identifier is analyst-17, and estimates and logs are written to the run-specific directory. With absolute paths chosen for this example, a corrected record is: {"schema_version":"1.0","run_id":"RUN-2026-0512-05","model":{"path":"/work/pkstudy/models/model.mod"},"data":{"path":"/work/pkstudy/data/data.csv"},"configuration":{"path":"/work/pkstudy/config/focei.yaml"},"software":{"name":"NLME-X","version":"4.2.1"},"started_at":"2026-05-12T09:30:00Z","operator":"analyst-17","outputs":{"estimates":"/work/pkstudy/results/RUN-2026-0512-05/estimates.csv","log":"/work/pkstudy/results/RUN-2026-0512-05/run.log"}}

The repair makes each field explicit and resolves the stated ambiguities. Absolute paths are appropriate here only if the intended review context can access that project location; a documented project-root-relative convention would be a valid alternative. The configuration is included because the draft omitted a required part of the run specification.

Validation and Failure Modes

A manifest can be syntactically valid yet operationally misleading. Validation should therefore check both its structure and its references. Structural checks include whether the record parses as the chosen format, required keys are present, values have the expected types, timestamps follow the agreed format, and output roles use the schema's defined names. Reference checks can confirm that input paths resolve and, when recorded, that calculated digests match the referenced files.

Validation should happen at a well-defined point: after run-specific values are assembled and before the manifest is treated as the authoritative description of that run. A missing configuration should not be silently replaced with an empty string. If a field is genuinely inapplicable, the schema should define how to represent that case, such as an explicit null for an optional field. Required fields should not be made optional merely to let incomplete records pass.

  • Ambiguous time: A local timestamp without a timezone may refer to different instants. Record an explicit offset or UTC.
  • Unpinned software label: “Latest” can change between runs. Record a specific version rather than a moving label.
  • Generic paths: A filename such as data.csv may resolve to different files in different working directories. Define the path base or use a resolvable URI.
  • Output overclaim: A planned output path does not show that a file was created. Keep the manifest's location record distinct from claims about run completion.
  • Schema drift: A parser may misread renamed or retyped fields. Increment and validate the schema version when the record structure changes.
  • Unescaped or malformed JSON: A hand-edited file may fail to parse. Use a JSON serializer and validate the result rather than relying only on visual inspection.
Common mistake: Treating a manifest as a free-text note or as a filename with extra details. For example, “model 2, data final, run by Sam” is not a reliable record: “final” and “model 2” have no defined referents, and “Sam” may not uniquely identify the operator. Replace informal labels with schema-defined fields and resolvable references.

Choosing a Format and Recognizing Limits

JSON is a practical choice when manifests need to be parsed by common programming languages and tools. YAML can be easier for people to edit, but its parsing rules and implicit type conversions require care. Either format can work if the schema is explicit, the same field meanings are applied consistently, and the records are validated. A spreadsheet may be convenient for browsing multiple runs, but it is not a substitute for a defined per-run record when fields, types, and parsing behavior matter.

A manifest is not the model, the data, or the configuration; references can break if the referenced materials move or become unavailable. Nor does recording a software version capture all execution details. The next workflow concern is recording the broader execution environment; here, record the software identity and version without claiming that this alone fully describes the environment. Likewise, recording output locations is not the same as preserving output artifacts or documenting run status.

The manifest is valuable because it reduces avoidable ambiguity. Its quality depends on a clear schema, accurate values collected for the run, consistent path and time conventions, and validation. It should be reviewed when the workflow changes: a new required input or a changed field meaning may require a schema update rather than an informal addition.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. Why should a run manifest record a configuration reference separately from the model reference?
  2. A manifest records started_at as 2026-06-03T14:00:00, with no timezone. What is missing, and give one unambiguous correction.
  3. What can a matching input-file digest support, and what does it not establish?
  4. A JSON record parses successfully but omits the operator and lists outputs only as “results.” Is it adequate? Explain.

Solutions. (1) The configuration can change run settings independently of the model file, so both references are needed to identify what was supplied. (2) The timezone is missing; if the time is UTC, record 2026-06-03T14:00:00Z. (3) A matching digest supports checking that the referenced bytes match the recorded content identity, assuming the digest was computed and recorded correctly; it does not make the file available or prove that the run used it. (4) No. A parseable record can still be incomplete: it omits a required operator identifier and does not identify specific output roles or locations. Define and validate those fields in the schema.

Clinical Biostats