Skip to content

Commit

Permalink
add import torch
Browse files Browse the repository at this point in the history
Signed-off-by: youkaichao <[email protected]>
  • Loading branch information
youkaichao committed Dec 6, 2024
1 parent 87f5c38 commit 810a8fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion depyf/explain/patched_lazy_format_graph_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def patched_lazy_format_graph_code(name, gm, maybe_id=None, **kwargs):
use_gm = True

# use `print_readable` because it can include submodules
src = "from __future__ import annotations\n" + \
src = "from __future__ import annotations\nimport torch\n" + \
gm.print_readable(print_output=False)
src = src.replace("<lambda>", "GraphModule")
try:
Expand Down

0 comments on commit 810a8fb

Please sign in to comment.