You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: If you have a model or program that is not supported yet but should be, please use the program coverage template.
🐛 Bug
codeutils.to_printable does not seem to be able to handle a NamedTuple, but thunder.jit looks happy with a function that takes a NamedTuple as one of its arguments.
thunder.jit(f)(x, y, my_tuple) = tensor([[0.3599, 0.9889],
[0.1036, 0.6854]])
Traceback (most recent call last):
File "/home/mkozuki/ghq/github.com/Lightning-AI/lightning-thunder/c.py", line 31, in <module>
main()
File "/home/mkozuki/ghq/github.com/Lightning-AI/lightning-thunder/c.py", line 27, in main
codeutils.to_printable(trace, my_tuple)
File "/home/mkozuki/ghq/github.com/Lightning-AI/lightning-thunder/thunder/core/codeutils.py", line 144, in to_printable
flat, spec = tree_flatten(x, namespace="")
File "/home/mkozuki/ghq/github.com/Lightning-AI/lightning-thunder/thunder/core/pytree.py", line 73, in tree_flatten
raise TypeError(f"tree_flatten of type {type(args)} is not supported.")
TypeError: tree_flatten of type <class '__main__.MyTuple'> is not supported.
Expected behavior
It just works.
The text was updated successfully, but these errors were encountered:
Note: If you have a model or program that is not supported yet but should be, please use the program coverage template.
🐛 Bug
codeutils.to_printable
does not seem to be able to handle aNamedTuple
, butthunder.jit
looks happy with a function that takes aNamedTuple
as one of its arguments.I faced this in #1415 (comment).
To Reproduce
Code sample
Expected behavior
It just works.
The text was updated successfully, but these errors were encountered: