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

C++ tree with path API #24906

Merged
merged 1 commit into from
Dec 1, 2024
Merged

C++ tree with path API #24906

merged 1 commit into from
Dec 1, 2024

Conversation

copybara-service[bot]
Copy link

@copybara-service copybara-service bot commented Nov 14, 2024

C++ tree with path API

  • Make tree_util.tree_flatten_with_path and tree_map_with_path APIs to be C++-based, to speed up the pytree flattening.

  • Moves all the key classes down to C++ level, while keeping the APIs unchanged.

    • Known small caveats: they are no longer Python dataclasses, and pattern matching might make pytype unhappy.
  • Registered defaultdict and ordereddict via the keypath API now.

@copybara-service copybara-service bot force-pushed the test_694219933 branch 14 times, most recently from 851cf3d to 28f044a Compare November 21, 2024 22:43
@copybara-service copybara-service bot force-pushed the test_694219933 branch 9 times, most recently from 6122f31 to 2cbf5a9 Compare December 1, 2024 04:49
* Make tree_util.tree_flatten_with_path and tree_map_with_path APIs to be C++-based, to speed up the pytree flattening.

* Moves all the key classes down to C++ level, while keeping the APIs unchanged.
  * Known small caveats: they are no longer Python dataclasses, and pattern matching might make pytype unhappy.

* Registered defaultdict and ordereddict via the keypath API now.

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