Skip to content

Comments

# [grain] Add checks for parameters passed to grain.experimental.index_shuffle that will throw an exception that can be caught by the Python interpreter#1144

Merged
copybara-service[bot] merged 1 commit intomainfrom
test_838873254
Dec 1, 2025

Conversation

@copybara-service
Copy link

@copybara-service copybara-service bot commented Dec 1, 2025

[grain] Add checks for parameters passed to grain.experimental.index_shuffle that will throw an exception that can be caught by the Python interpreter

Currently when an invalid rounds parameter is passed, an assert fails which crashes the interpreter. If index > max_index, an infinite loop may result, but this depends on the seed.

@copybara-service copybara-service bot force-pushed the test_838873254 branch 3 times, most recently from 378f0db to 0165da3 Compare December 1, 2025 20:07
@copybara-service copybara-service bot changed the title # [grain] Add checks for parameters passed to grain.experimental.index_shuffle that will throw an exception that can by caught by the Python interpreter # [grain] Add checks for parameters passed to grain.experimental.index_shuffle that will throw an exception that can be caught by the Python interpreter Dec 1, 2025
@copybara-service copybara-service bot force-pushed the test_838873254 branch 11 times, most recently from a2ce6be to 955e09c Compare December 1, 2025 21:53
…ex_shuffle` that will throw an exception that can be caught by the Python interpreter

Currently when an invalid `rounds` parameter is passed, an assert fails which crashes the interpreter. If index > max_index, an infinite loop may result, but this depends on the seed.

PiperOrigin-RevId: 838928653
@copybara-service copybara-service bot merged commit 3a5796b into main Dec 1, 2025
@copybara-service copybara-service bot deleted the test_838873254 branch December 1, 2025 22:15
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