mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[BE] bump optree
version to 0.12.1 (#130139)
0.12.0 Major Updates: - Add context manager to temporarily set the dictionary sorting mode - Add accessor APIs - Use `stable` tag for `pybind11` for Python 3.13 support - Fix potential segmentation fault for pickling support 0.12.1 Updates: - Fix warning regression during import when launch with strict warning filters Closes #130155 Pull Request resolved: https://github.com/pytorch/pytorch/pull/130139 Approved by: https://github.com/zou3519
This commit is contained in:
committed by
PyTorch MergeBot
parent
1e897a0ca4
commit
8fcb156e8b
@ -273,7 +273,7 @@ def tree_flatten(
|
||||
>>> from collections import OrderedDict
|
||||
>>> tree = OrderedDict([('b', (2, [3, 4])), ('a', 1), ('c', None), ('d', 5)])
|
||||
>>> tree_flatten(tree)
|
||||
([2, 3, 4, 1, None, 5], PyTreeSpec(OrderedDict([('b', (*, [*, *])), ('a', *), ('c', *), ('d', *)]), NoneIsLeaf))
|
||||
([2, 3, 4, 1, None, 5], PyTreeSpec(OrderedDict({'b': (*, [*, *]), 'a': *, 'c': *, 'd': *}), NoneIsLeaf))
|
||||
|
||||
Args:
|
||||
tree (pytree): A pytree to flatten.
|
||||
|
Reference in New Issue
Block a user