mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-05 08:37:06 +08:00
add error traceback info (#3419)
Some checks failed
Deploy GitHub Pages / deploy (push) Has been cancelled
Some checks failed
Deploy GitHub Pages / deploy (push) Has been cancelled
* add error traceback info * update error msg * update code --------- Co-authored-by: Jiang-Jia-Jun <163579578+Jiang-Jia-Jun@users.noreply.github.com>
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
"""
|
||||
|
||||
import os
|
||||
import traceback
|
||||
|
||||
|
||||
def check_safetensors_model(model_dir: str):
|
||||
@@ -45,5 +46,5 @@ def check_safetensors_model(model_dir: str):
|
||||
sum(flags) == safetensors_num
|
||||
), f"Number of safetensor files should be {len(model_files)}, but now it's {sum(flags)}"
|
||||
except Exception as e:
|
||||
raise Exception(f"Failed to check unified checkpoint, details: {e}.")
|
||||
raise Exception(f"Failed to check unified checkpoint, details: {e}, {str(traceback.format_exc())}.")
|
||||
return is_safetensors
|
||||
|
Reference in New Issue
Block a user