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

Former-commit-id: 573e3183e6
This commit is contained in:
Chengcheng Pei
2024-09-25 12:59:48 -07:00
parent fb75821793
commit e80c98367e
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))