Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optax.tree_utils.tree_random_split. #1063

Merged

Conversation

carlosgmartin
Copy link
Contributor

This exposes the formerly private function _tree_rng_keys_split in optax/tree_utils/_random.py to the public API.

I've found this to be a useful helper function for manipulation of random trees, and intend to use it for future PRs.

@carlosgmartin carlosgmartin force-pushed the tree_random_split branch 2 times, most recently from 8a76fd4 to b9bdf05 Compare September 17, 2024 21:59
@vroulet
Copy link
Collaborator

vroulet commented Sep 17, 2024

Thanks for doing that, it's a good idea, happy to know it can be useful. (sorry for the incremental review, didn't mean to do it like that).

Copy link
Collaborator

@vroulet vroulet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few remaining comments

optax/tree_utils/_random_test.py Outdated Show resolved Hide resolved
optax/tree_utils/_random.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@vroulet vroulet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again !

@copybara-service copybara-service bot merged commit fad9a20 into google-deepmind:main Sep 20, 2024
8 checks passed
@carlosgmartin carlosgmartin deleted the tree_random_split branch September 20, 2024 21:13
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.

2 participants