Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
echarlaix committed Oct 11, 2024
1 parent 6f7c6c5 commit 942d164
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion optimum/exporters/onnx/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,11 @@ def onnx_export_from_model(

if check_if_transformers_greater("4.44.99"):
misplaced_generation_parameters = model.config._get_non_default_generation_parameters()
if isinstance(model, GenerationMixin) and model.can_generate() and len(misplaced_generation_parameters) > 0:
if (
isinstance(model, GenerationMixin)
and model.can_generate()
and len(misplaced_generation_parameters) > 0
):
logger.warning(
"Moving the following attributes in the config to the generation config: "
f"{misplaced_generation_parameters}. You are seeing this warning because you've set "
Expand Down

0 comments on commit 942d164

Please sign in to comment.