bundle.json fields
The fields of bundle.json, the record at the top of every bundle folder.
bundle.json is a JSON file. A reader checks format first. It must read experimenter-bundle.
The format version rule
format_version is an integer. This build writes version 1. A reader refuses a bundle with a format_version above the one it reads. The message names the build that reads it. Verify and Open both apply this rule before they unpack a file.
Top-level fields
| Field | Content |
|---|---|
format | experimenter-bundle |
format_version | 1 |
created | The creation time. SOURCE_DATE_EPOCH fixes it |
experiment | name, path, rewritten, original_sha256 |
model | name, root, model_hash |
batch | path, section, engine, runs, started, finished, wall_seconds, output_files, output_layout |
versions | recorded_at, experimenter, engine, experimenter_engine, experimenter_engine_commit, stella_rules, stella, components, python, macos, chip |
verify | method, tolerance, expected_seconds |
bundle | policy: the match policy of this bundle, one level and action for each component |
files | One entry for each file in the zip except bundle.json: path, sha256, size, role |
withheld | One entry for each file left out: path, sha256, size, role, reason |
external_commands | Script words that named no file |
complete | true when withheld is empty |
Notes on fields
Every path in files and withheld, except README.md, starts with files/ and is relative to the bundle folder. Experimenter cuts off the common parent folder of the files of the author. No part of the home path of the author appears in the zip.
The bundle keeps the Batch record batch.json. Its models section holds the file hashes and the model hash of each model. The bundle rewrites each absolute path in the record. A path inside the bundle becomes files/.... Any other path becomes <external>/<file name>.
bundle.json cannot hold its own hash, so files omits it. files lists README.md with the role readme.
experiment.rewritten is true when Experimenter changed paths in the Experiment file. Then original_sha256 holds the hash of the original. Otherwise it is null, and the copy has the same sha256 as the original.
batch.section is run, sensitivity, optimization or sequence:<name>. Experimenter reads it from the records. Verify uses it to choose what to run again.
batch.id is the Batch id in batch.json.
versions.recorded_at is batch when batch.json has an environment section. It is bundle when it has none. Then the versions name the machine that made the bundle, and the README repeats this.
bundle create refuses a batch.json whose format is not 3. The message names the format key. The bundle keeps no progress.ndjson.
Verify reads the seeds and sequences sections of batch.json. It sets each drawn Sensitivity or optimizer seed on the re-run. It takes the engine of every stage from engine_override in a Sequence.
The bundle changes each absolute path in batch.json to a bundle path or to <external>/<file name>. This includes the Experiment path, the argv and the component paths.
versions.components maps each component of the batch record to its version: Experimenter, stella-rules, the Experimenter engine and Stella, and Python, Rscript and NumPy when a Script step used them. Verify compares these versions under bundle.policy.
bundle.policy is the policy that the author chose with bundle create --match or the Export dialog. Without a choice it is the Default match for new bundles of the author. Verify reads the policy from this field and never from its own settings. A bundle with no bundle field verifies with the warn action for every component.
verify.method is the rule that verify uses on a machine that can run the engine: exact, tolerance or hash-only. The tolerance object holds nrmse and flat_abs, both 1e-6.
withheld keeps the sha256 of each left-out file. A reader who gets the file later can check it against that hash.
Roles
| Role | File |
|---|---|
experiment | The Experiment file |
model, module | The root model and each module file |
saved-runs | An .isdb file beside the model |
imported-data, dataset | Data files that the model imports or that the batch used |
variable-list, comparison | Output variable lists and comparison CSV files |
script | A file that a Script command names |
manifest | The Batch record batch.json, the one record of the batch |
output | A collated output file of the batch |
readme | README.md |
A re-run needs the roles experiment, model, module, imported-data, dataset, variable-list, comparison, script and saved-runs. A withheld file with one of them makes verify skip the re-run.