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

Former-commit-id: 0f0a4813db9ca4e9bb5762a781a0a214129284a6
This commit is contained in:
Chengcheng Pei
2024-09-25 12:59:48 -07:00
parent c376eed31d
commit 26bbfc084d
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))