Skip to content
Merged
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
13 changes: 11 additions & 2 deletions vllm/compilation/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,17 @@ def patched_inline_call(self_):
output = self.aot_compiled_fn(self, *args, **kwargs)
assert aot_compilation_path is not None
assert cache_dir is not None
os.makedirs(cache_dir, exist_ok=True)
self.aot_compiled_fn.save_compiled_function(aot_compilation_path)
try:
os.makedirs(cache_dir, exist_ok=True)
self.aot_compiled_fn.save_compiled_function(
aot_compilation_path
)
except Exception as e:
logger.warning(
"Cannot save aot compilation to path %s, error: %s",
aot_compilation_path,
str(e),
)
Comment on lines +411 to +415
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

For better debuggability, it's recommended to log the full traceback of the exception. This can be achieved by passing exc_info=True to the logger. It will help in diagnosing the root cause of serialization failures for the long-term fix. Also, you can pass the exception object e directly to the logger instead of str(e).

Suggested change
logger.warning(
"Cannot save aot compilation to path %s, error: %s",
aot_compilation_path,
str(e),
)
logger.warning(
"Cannot save aot compilation to path %s, error: %s",
aot_compilation_path,
e,
exc_info=True,
)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zhxchen17 try-catch on general exception generally not good, we're gonna want to remove this in the medium term.

else:
output = self.compiled_callable(*args, **kwargs)
return output
Expand Down