Skip to content

Commit 96793dd

Browse files
committed
Merge branch 'main' of https://github.com/sdpython/onnx-diagnostic into vers
2 parents d40eb78 + 752b783 commit 96793dd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

onnx_diagnostic/torch_models/hghub/hub_api.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,10 @@ def task_from_id(
206206
data = load_architecture_task()
207207
if model_id in data:
208208
return data[model_id]
209+
if not config.architectures or not config.architectures:
210+
# Some hardcoded values until a better solution is found.
211+
if model_id.startswith("google/bert_"):
212+
return "fill-mask"
209213
assert config.architectures is not None and len(config.architectures) == 1, (
210214
f"Cannot return the task of {model_id!r}, pipeline_tag is not setup, "
211215
f"architectures={config.architectures} in config={config}. "

0 commit comments

Comments
 (0)