提交 cb4fc95a 编写于 作者: L liukai6

update error info when sha256sum not match

上级 03362fa0
...@@ -289,8 +289,10 @@ def get_model_files(model_config, model_output_dir): ...@@ -289,8 +289,10 @@ def get_model_files(model_config, model_output_dir):
model_config[YAMLKeyword.model_file_path] = model_file model_config[YAMLKeyword.model_file_path] = model_file
if sha256_checksum(model_file) != model_sha256_checksum: if sha256_checksum(model_file) != model_sha256_checksum:
MaceLogger.error(ModuleName.MODEL_CONVERTER, error_info = model_file_path + \
"model file sha256checksum not match") " model file sha256checksum not match " + \
model_sha256_checksum
MaceLogger.error(ModuleName.MODEL_CONVERTER, error_info)
if weight_file_path.startswith("http://") or \ if weight_file_path.startswith("http://") or \
weight_file_path.startswith("https://"): weight_file_path.startswith("https://"):
...@@ -306,8 +308,10 @@ def get_model_files(model_config, model_output_dir): ...@@ -306,8 +308,10 @@ def get_model_files(model_config, model_output_dir):
if weight_file: if weight_file:
if sha256_checksum(weight_file) != weight_sha256_checksum: if sha256_checksum(weight_file) != weight_sha256_checksum:
MaceLogger.error(ModuleName.MODEL_CONVERTER, error_info = weight_file_path + \
"weight file sha256checksum not match") " weight file sha256checksum not match " + \
weight_sha256_checksum
MaceLogger.error(ModuleName.MODEL_CONVERTER, error_info)
if quantize_range_file_path.startswith("http://") or \ if quantize_range_file_path.startswith("http://") or \
quantize_range_file_path.startswith("https://"): quantize_range_file_path.startswith("https://"):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册