Skip to content

Commit

Permalink
modify regex pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
echarlaix committed Oct 20, 2023
1 parent 6c54062 commit 74b02d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion optimum/exporters/onnx/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ def ordered_inputs(self, model: Union["PreTrainedModel", "TFPreTrainedModel"]) -
sig = inspect.signature(model.call)

for param in sig.parameters:
param_regex = re.compile(rf"{param}(\.\d*)?")
param_regex = re.compile(rf"{param}(\.\d*)?$")
to_insert = []
for name, dynamic_axes in inputs.items():
if re.match(param_regex, name):
Expand Down

0 comments on commit 74b02d9

Please sign in to comment.