Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make model compilation failure a warning only #530

Closed
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
8 changes: 7 additions & 1 deletion src/axolotl/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,13 @@ def train(

if torch.__version__ >= "2" and sys.platform != "win32":
LOG.info("Compiling torch model")
model = torch.compile(model)
try:
model = torch.compile(model)
except RuntimeError as ex:
LOG.warning(
"An error was raised by PyTorch when performing compile operation. This warning can be ignored if model compilation is not required: '%s'",
str(ex),
)

# go ahead and presave, so we have the adapter config available to inspect
if peft_config:
Expand Down