Closed XuehaiPan closed 1 year ago
Base: 92.65% // Head: 92.93% // Increases project coverage by +0.28%
:tada:
Coverage data is based on head (
f233607
) compared to base (582f355
). Patch coverage: 90.00% of modified lines in pull request are covered.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Description
Describe your changes in detail.
Motivation and Context
Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. You can use the syntax
close #15213
if this solves the issue #15213Add functions
tree_flatten_with_path
,tree_paths
, andtree_map_with_path
.The
path
is a tuple of entries (indices or keys) to the corresponding leaf. The depth of the leaf can be derivated bydepth = len(path)
.Types of changes
What types of changes does your code introduce? Put an
x
in all the boxes that apply:Checklist
Go over all the following points, and put an
x
in all the boxes that apply. If you are unsure about any of these, don't hesitate to ask. We are here to help!make format
. (required)make lint
. (required)make test
pass. (required)