[MISC] Skip dumping inputs when unpicklable (#8744)
This commit is contained in:
parent
3185fb0cca
commit
b8747e8a7c
@ -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)]
|
||||||
|
|
||||||
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(
|
logger.info(
|
||||||
"Completed writing input of failed execution to %s.",
|
"Completed writing input of failed execution to %s.",
|
||||||
filename)
|
filename)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user