Unverified Commit b8747e8a authored by Cody Yu's avatar Cody Yu Committed by GitHub
Browse files

[MISC] Skip dumping inputs when unpicklable (#8744)

parent 3185fb0c
...@@ -137,7 +137,15 @@ def dump_input_when_exception(exclude_args: Optional[List[int]] = None, ...@@ -137,7 +137,15 @@ def dump_input_when_exception(exclude_args: Optional[List[int]] = None,
for t in kv_caches for t in kv_caches
if is_tensor(t)] if is_tensor(t)]
try:
pickle.dump(dumped_inputs, filep) 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( logger.info(
"Completed writing input of failed execution to %s.", "Completed writing input of failed execution to %s.",
filename) filename)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment