Skip to content

Build Zarr templates on Beam workers to reduce controller memory usage. - #335

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_1012390582
Open

copybara-service[bot] wants to merge 1 commit into
mainfrom
test_1012390582

Conversation

@copybara-service

Copy link
Copy Markdown

Build Zarr templates on Beam workers to reduce controller memory usage.

Extract shared Zarr writing logic into _WriteChunksToZarrBase, route streams with beam.Partition, and build xarray_beam templates lazily inside a Beam worker via AsSingleton rather than in the controller process. Also drop dimensionless scalar coordinates from chunked Zarr templates so region writes do not fail on unsliced variables, and cap fine-grid latitude chunk sizes for AggregationState outputs.

Extract shared Zarr writing logic into `_WriteChunksToZarrBase`, route streams with `beam.Partition`, and build `xarray_beam` templates lazily inside a Beam worker via `AsSingleton` rather than in the controller process. Also drop dimensionless scalar coordinates from chunked Zarr templates so region writes do not fail on unsliced variables, and cap fine-grid latitude chunk sizes for `AggregationState` outputs.

PiperOrigin-RevId: 1012390582
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