We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c30d488 commit 715c054Copy full SHA for 715c054
optimum/exporters/openvino/convert.py
@@ -614,7 +614,12 @@ def export_from_model(
614
model.config.save_pretrained(output)
615
generation_config = getattr(model, "generation_config", None)
616
if generation_config is not None:
617
- generation_config.save_pretrained(output)
+ try:
618
+ generation_config.save_pretrained(output)
619
+ except Exception as exception:
620
+ logger.warning(
621
+ f"The generation config will not be saved, saving failed with following error:\n{exception}"
622
+ )
623
624
model_name_or_path = model.config._name_or_path
625
maybe_save_preprocessors(model_name_or_path, output, trust_remote_code=trust_remote_code)
0 commit comments