Skip to content

Convert General PyTree to builtins #15116

Answered by jakevdp
joeryjoery asked this question in Q&A
Discussion options

You must be logged in to vote

Hi - thanks for the question. I don't know of any APi to do what you have in mind. PyTrees were not really designed with this level of introspection in mind. I think you'd have better luck unflattening the object and inspecting things at the Python level, where you have access to all the type names.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@joeryjoery
Comment options

Answer selected by joeryjoery
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants