Skip to content

Commit

Permalink
fix updated broken checking nondefault parameters (#1038)
Browse files Browse the repository at this point in the history
  • Loading branch information
eaidova authored Nov 27, 2024
1 parent da5903d commit 860bdf8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion optimum/exporters/openvino/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ def export_from_model(
# some model configs may have issues with loading without parameters initialization
try:
misplaced_generation_parameters = model.config._get_non_default_generation_parameters()
except KeyError:
except (KeyError, TypeError):
misplaced_generation_parameters = {}
if isinstance(model, GenerationMixin) and len(misplaced_generation_parameters) > 0:
logger.warning(
Expand Down
2 changes: 1 addition & 1 deletion optimum/intel/openvino/modeling_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def __init__(
# some model configs may have issues with loading without parameters initialization
try:
misplaced_generation_parameters = self.config._get_non_default_generation_parameters()
except KeyError:
except (KeyError, TypeError):
misplaced_generation_parameters = {}
if len(misplaced_generation_parameters) > 0:
logger.warning(
Expand Down
2 changes: 1 addition & 1 deletion optimum/intel/openvino/modeling_base_seq2seq.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def __init__(
# some model configs may have issues with loading without parameters initialization
try:
misplaced_generation_parameters = self.config._get_non_default_generation_parameters()
except KeyError:
except (KeyError, TypeError):
misplaced_generation_parameters = {}
if len(misplaced_generation_parameters) > 0:
logger.warning(
Expand Down

0 comments on commit 860bdf8

Please sign in to comment.