Skip to content

Commit cf74cd0

Browse files
committed
fixes
1 parent 919b2e6 commit cf74cd0

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

onnx_diagnostic/torch_models/hghub/hub_api.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,18 @@ def _trygetattr(config, attname):
184184
return None
185185

186186

187+
def rewrite_architecture_name(name: Optional[str]) -> Optional[str]:
188+
if name == "ConditionalDETRForObjectDetection":
189+
return "ConditionalDetrForObjectDetection"
190+
return name
191+
192+
187193
def architecture_from_config(config) -> Optional[str]:
194+
"""Guesses the architecture (class) of the model described by this config."""
195+
return rewrite_architecture_name(_architecture_from_config(config))
196+
197+
198+
def _architecture_from_config(config) -> Optional[str]:
188199
"""Guesses the architecture (class) of the model described by this config."""
189200
if isinstance(config, dict):
190201
if "_class_name" in config:

onnx_diagnostic/torch_models/hghub/hub_data.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55

66
__date__ = "2025-06-21"
77

8-
__data_arch_values__ = {"ResNetForImageClassification": dict(image_size=224)}
8+
__data_arch_values__ = {
9+
"ConditionalDETRForObjectDetection": dict(image_size=224),
10+
"ResNetForImageClassification": dict(image_size=224),
11+
}
912

1013
__data_arch__ = textwrap.dedent(
1114
"""

0 commit comments

Comments
 (0)