Skip to content

Commit

Permalink
fix NORMALIZED_CONFIG_CLASS and task.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tedasdf committed Dec 3, 2024
1 parent 5aae9cb commit 2d48a9b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions optimum/exporters/onnx/model_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ def inputs(self) -> Dict[str, Dict[int, str]]:
class VisualBertOnnxConfig(TextAndVisionOnnxConfig):
DEFAULT_ONNX_OPSET = 11

NORMALIZED_CONFIG_CLASS = NormalizedTextConfig

@property
def inputs(self) -> Dict[str, Dict[int, str]]:
return {
Expand Down
4 changes: 2 additions & 2 deletions optimum/exporters/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1108,10 +1108,10 @@ class TasksManager:
"text-to-audio",
onnx="VitsOnnxConfig",
),
"visualbert": supported_tasks_mapping(
"visual_bert": supported_tasks_mapping(
"multiple-choice",
"question-answering",
"image-to-text",
"feature-extraction",
onnx="VisualBertOnnxConfig",
),
"wavlm": supported_tasks_mapping(
Expand Down
4 changes: 2 additions & 2 deletions tests/exporters/exporters_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
"document-question-answering-with-past",
],
},
"visualbert": "hf-internal-testing/tiny-random-VisualBertModel",
"visual_bert": "hf-internal-testing/tiny-random-VisualBertModel",
}


Expand Down Expand Up @@ -287,7 +287,7 @@
"speech-to-text": "codenamewei/speech-to-text",
"xlm": "xlm-clm-ende-1024",
"xlm-roberta": "Unbabel/xlm-roberta-comet-small",
"visualbert": "unc-nlp/visualbert-uncased",
"visual_bert": "uclanlp/visualbert-vqa-coco-pre",
}

TENSORFLOW_EXPORT_MODELS = {
Expand Down

0 comments on commit 2d48a9b

Please sign in to comment.