Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions unsloth_zoo/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,10 @@ def create_new_function(
imports += "import torch\n"
imports += "import torch.nn as nn\n"
imports += "from torch.nn import functional as F\n"
if "torch_compile" in new_source:
imports += "from unsloth_zoo.temporary_patches.common import torch_compile\n"
if "KWARGS_TYPE" in new_source:
imports += "from unsloth_zoo.temporary_patches.utils import KWARGS_TYPE\n"
Comment thread
Datta0 marked this conversation as resolved.
imports += (
"from typing import Any, List, Optional, Tuple, Union, Dict, Set, Callable\n"
)
Expand Down
Loading