Skip to content

Commit 49bafff

Browse files
committed
fix mypy
1 parent 182439c commit 49bafff

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

_unittests/ut_torch_models/test_hghub_model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def test_get_untrained_model_with_inputs_text2text_generation(self):
9696
data = get_untrained_model_with_inputs(mid, verbose=1)
9797
self.assertIn((data["size"], data["n_weights"]), [(473928, 118482)])
9898
model, inputs = data["model"], data["inputs"]
99-
raise unittest.SkipTest(f"not wroking for {mid!r}")
99+
raise unittest.SkipTest(f"not working for {mid!r}")
100100
model(**inputs)
101101

102102
@hide_stdout()

onnx_diagnostic/torch_models/hghub/model_inputs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def reduce_model_config(config: Any, task: str) -> Dict[str, Any]:
101101
return kwargs
102102

103103

104-
def check_hasattr(config: Any, *args: Union[str, Tuple[str, ...]]):
104+
def check_hasattr(config: Any, *args: Union[str, Tuple[Any, ...]]):
105105
"""
106106
Checks the confiugation has all the attributes in ``args``.
107107
Raises an exception otherwise.
@@ -185,7 +185,7 @@ def random_input_kwargs(config: Any, task: str) -> Tuple[Dict[str, Any], Callabl
185185
),
186186
encoder_dim=_pick(config, "n_positions", "d_model"),
187187
)
188-
fct = get_inputs_for_text2text_generation
188+
fct = get_inputs_for_text2text_generation # type: ignore
189189
elif task == "image-classification":
190190
check_hasattr(config, "image_size", "num_channels")
191191
if isinstance(config.image_size, int):

0 commit comments

Comments
 (0)