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
We should not add alternative ways to do things much, it is good when there is only one way to achieve things.
What's bad with using thunder.last_traces?
There's nothing bad with thunder.last_traces, the alternative is better:
@thunder.jitdeff():
pass# Call once ...f()
# ... and access the traces withf.last_traces
It doesn't matter in scripts but it's more friendly to REPL development and exploration. Users can hit TAB and see what can be done with this object that thunder.jit returns.
With thunder.last_traces as a free function there's an additional effort involved of knowing and understanding which objects are allowed to be passed to thunder.last_traces.
🚀 Feature
Make trace introspection available as methods or attribute accesses on functions returned by
thunder.jit
.Looking at the last traces of a thunder callable currently requires importing Thunder explicitly. They are currently hidden behind
._lc_cs
attribute:lightning-thunder/thunder/__init__.py
Line 836 in a0a6151
The text was updated successfully, but these errors were encountered: