Skip to content

Reproduce and report a run

Every cascade.run returns three things that make a result traceable: the parameters, a stage log and a fingerprinted manifest.

The manifest

res = cascade.run(inputs, params)
m = res.manifest
m["schema"]            # "quakecascade-run-manifest-v1"
m["package_version"]   # the quakecascade version that ran
m["parameters"]        # every CascadeParams field, including the stated choices
m["inputs"]            # a content digest of every input table (geometry included)
m["run_fingerprint"]   # SHA-256 over all of the above (the creation time is excluded)
m["stages"]            # run / skipped, per stage

The same inputs and parameters give the same fingerprint. The test suite checks this from run to run, and the synthetic-town example gave the same fingerprint on Windows and macOS when this was checked for the release. contract.validate_manifest(m) recomputes the fingerprint and checks that the manifest was not edited.

Save the manifest with the results:

import json
json.dump(res.manifest, open("run_manifest.json", "w"), indent=2, default=str)

cascade.export_geopackage writes it next to the GeoPackage automatically.

The stage log

res.stages records, for each stage, whether it ran or why it was skipped, and the counts that qualify the result: buildings per status, heights assumed, roads uncertain, units and sites off the network, units left out of the ranking. These counts belong in a report next to the numbers they qualify.

What to write down

A result from the cascade is reproducible when the report states:

  1. the package version and the run fingerprint;
  2. every stated choice: debris_k, closed_share, clear_width_m, closure_rule, road speeds, design_levels and chain_level, partial_units, unknown_height_reach_m, default_height, the collapse seed or the number of draws;
  3. the input sources and their dates, which the digests then pin down;
  4. the stage-log counts for missing and assumed values;
  5. the calibration limits of the models used (see Scope and limitations).