Repository navigation
Conversation
danohu
marked this pull request as draft
October 15, 2026 18:23
harmonize and emit can split a backfill into disjoint shards of the sorted tiles, but ingest has to cover every tile in one process. The same two flags, applied to the same tile list, let an ingest backfill be split the same way: `--modulus N --residues i` picks the same tiles in ingest as in harmonize and emit. As with the tile set itself, the shard only bounds tiled datasets: a whole-world dataset is still ingested over its one "world" tile, by every shard. Defaults leave existing invocations unchanged.
danohu
force-pushed
the
ingest-sharding
branch
from
October 15, 2026 18:27
e499fea to
acbfe5f
Compare
danohu
marked this pull request as ready for review
October 15, 2026 19:34
…t and ingest harmonize, emit and ingest can already be run for one shard of the sorted tiles; attribute could only run every tile at once. With the same two flags, `--modulus N --residues i` picks the same tile in all four CLIs, so a per-tile job can compute that tile's cached partials, and a later unsharded run merges them from the cache. The shard filters the tile -> countries map before anything is computed, so a sharded run returns only its own tiles' rows. Defaults leave existing callers, including trace.workflow, unchanged.
danohu
marked this pull request as draft
October 21, 2026 06:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
harmonize and emit can split a backfill into disjoint shards of the sorted tiles, but ingest and attribute have to cover every tile in one process. This adds the same two flags to both, applied via
utils.iter_sharded, so--modulus N --residues ipicks the same tiles in all four CLIs.ingest
main()only;workflow()is unchanged.attribute
workflow()gainsmodulus/residues, which filter the tile -> countries map before anything is computed, so a sharded run returns only its own tiles' rows. A tile shared by two countries falls in one shard, so both its partials land together.Defaults leave existing invocations and callers, including
trace.workflow, unchanged. Also mergesmainto pick up #18.Tests:
jdluc/__tests__/ingest_test.pycovers all tiles, one shard, a single tile and two shards.jdluc/__tests__/attribute_test.pycovers every tile, each of two shards, and a tile shared by two countries. Neither needs a.env.