1, log exceptions in details; 2, check processor is None before calling it.

This commit is contained in:
Chengcheng Pei
2024-09-25 12:59:48 -07:00
parent 46e2c1ea9f
commit 573e3183e6
2 changed files with 8 additions and 4 deletions

View File

@@ -139,5 +139,5 @@ def export_model(args: Optional[Dict[str, Any]] = None) -> None:
model_args.export_hub_model_id, token=model_args.hf_hub_token
)
except Exception:
logger.warning("Cannot save tokenizer, please copy the files manually.")
except Exception as e:
logger.warning("Cannot save tokenizer, please copy the files manually. Error: {}".format(e))