Skip to content

Refactor: Move nested Beam functions to top-level.#11157

Merged
copybara-service[bot] merged 1 commit intomasterfrom
test_865650686
Feb 24, 2026
Merged

Refactor: Move nested Beam functions to top-level.#11157
copybara-service[bot] merged 1 commit intomasterfrom
test_865650686

Conversation

@copybara-service
Copy link
Contributor

Refactor: Move nested Beam functions to top-level.

This change refactors several dataset builders by moving functions used within Beam pipelines (e.g., in beam.Map, beam.FlatMap) from being nested inside _generate_examples to being top-level functions.

@google-cla
Copy link

google-cla bot commented Feb 5, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Moves nested functions to the module level and replaces them with `functools.partial` across multiple dataset builders (including robonet, rlu_rwrl, dataset_importer, covid19, web_graph, c4, youtube_vis, and grounded_scan). This ensures the Apache Beam pipelines can be successfully serialized in distributed environments using Cloudpickle.

PiperOrigin-RevId: 874686149
@copybara-service copybara-service bot merged commit 07610cd into master Feb 24, 2026
@copybara-service copybara-service bot deleted the test_865650686 branch February 24, 2026 18:40
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.

0 participants