Skip to content

Commit

Permalink
[MISC] Skip dumping inputs when unpicklable (vllm-project#8744)
Browse files Browse the repository at this point in the history
  • Loading branch information
comaniac committed Sep 24, 2024
1 parent 3185fb0 commit b8747e8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion vllm/worker/model_runner_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,15 @@ def _wrapper(*args, **kwargs):
for t in kv_caches
if is_tensor(t)]

pickle.dump(dumped_inputs, filep)
try:
pickle.dump(dumped_inputs, filep)
except Exception as pickle_err:
logger.warning(
"Failed to pickle inputs of failed execution: %s",
str(pickle_err))
raise type(err)(f"Error in model execution: "
f"{str(err)}") from err

logger.info(
"Completed writing input of failed execution to %s.",
filename)
Expand Down

0 comments on commit b8747e8

Please sign in to comment.