Skip to content

Require the settings that decide a number so none is chosen silently - #37

Merged
C1587S merged 5 commits into
mainfrom
peak-from-vmhwm-on-linux
Nov 28, 2026
Merged

C1587S merged 5 commits into
mainfrom
peak-from-vmhwm-on-linux

Conversation

@C1587S

@C1587S C1587S commented Nov 28, 2026

Copy link
Copy Markdown
Member
  • Seven settings that decide how a number comes out are required with no default and named in the changelog, so nobody gets a different number without having chosen it. Every config states them so no number moves, and a weight on a BigQuery table declares its column.
  • Peak memory comes from VmHWM on Linux and ru_maxrss on macOS, and every block is measured and recorded while only the first is judged, so one real run shows whether the memory a block takes matches what it was sized for.

On Linux ru_maxrss survives an exec, so a spawned worker read the peak of the process that started it. VmHWM of /proc/self/status is the high-water mark of the process's own address space. On a Midway3 compute node it started at the worker's own resident memory under spawn, fork and forkserver and grew by exactly what the worker touched. macOS keeps ru_maxrss. The aggregate stage reads its workers' peaks the same way, where it took Linux's kibibytes for thousands of bytes.
Each block is read the same way as the first, and the manifest records each block's own growth, with a summary of the spread of the measured blocks, the heaviest over the estimate and the first over the heaviest. On Linux a later block's growth is taken from the resident memory before it, VmRSS, since the peak before it is that of an earlier block. Only the first block is judged, so nothing is refused that was not before.
normalization, weights[].fallback and kind, backend.coverage, regions and source on_invalid_geometry, grid.offset and grid.lon_convention have no default, and a config that leaves one out is refused naming it. The library's own copies of the normalization default follow the caller, and a weights manifest without it is refused. The implicit-fallback warning goes with the fallback default. A BigQuery weight declares the column of its table, where pop was read from population. Every config and example here states the values its defaults gave, so no number moves.
A product's run manifest records the SHA-256 of the weights files it loaded, the weights manifest among them, and a regenerated weights manifest records another config hash. Regenerating the GADM weights needs the target layers, rebuilt from the GADM sources by the prepare_gadm*_targets.py scripts.
…rote it

The config hash changes for every weights config, so hashing candidate configs with this version cannot find the config of an earlier manifest. The published GADM weights name the version that wrote them as segment_weights 0.1.0.
@review-notebook-app

Copy link
Copy Markdown

Review Notebooks

Notebooks changed:

Review visual diffs and comment on any notebook cell. All comments sync back to this PR.


Powered by ReviewNB

@C1587S
C1587S merged commit a055d8b into main Nov 28, 2026
16 checks passed
@C1587S
C1587S deleted the peak-from-vmhwm-on-linux branch November 28, 2026 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant