Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/us-post-export-batch-files.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
US post-export scoring keeps each household batch of the written H5 in its own file instead of in memory. The scorer still loads the H5 once, bound to its SHA-256, and checks that the batches partition it. It then pickles each batch to a file, records the SHA-256 of the bytes written, frees the frames, and reads each batch back from its file whenever a pass scores it, freeing it before the next. A file that changed or cannot be read is refused, and the refusal stops certification in every stage, the held-out reports included. The process that scores therefore holds no frame of the H5 between batches: about 0.39 GiB less on the published 57,240-household national file (measured) and about 2.1 GiB less on a 352,932-household national export (estimate), for the whole of certification. Certification's scorer keeps the files in a directory of its own inside `post_export_batches/` in the build's `--out`, which takes about as much disk as the export H5, and removes them when it closes. Placing a build for certification removes files that a killed attempt left. Scored values are unchanged.
13 changes: 13 additions & 0 deletions docs/us-release-build-rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,19 @@ one Microsimulation over the whole file.

- The scorer loads the written H5 once, binds its SHA-256, and refuses to let
the release manifest pin different bytes.
- It then writes each household batch to its own file, recording the SHA-256
of the bytes written, and frees the frames. Each pass reads every batch back
from its file, frees it before reading the next, and refuses a file that
changed or cannot be read, so the process that scores holds no frame of the
written H5 between batches. A batch read back has the same tables, dtypes,
values and weights, so scored values are unchanged. A refused batch file
stops certification in every stage, the held-out reports included.
- Certification's scorer keeps the files in a directory of its own inside
`post_export_batches/` in the build's `--out`: about as much disk as the
export H5 itself, until the scorer closes. Placing a build for
certification removes the scorer directories a killed attempt left there
and keeps anything else, so two certifications of one `--out` must not run
at once.
- It refuses a file whose group units do not each nest in one household, or
whose batches do not partition every entity, before any engine exists.
- Batches hold at most `--maximum-microsim-batch-size` households (default
Expand Down
Loading
Loading