Skip to content

Commit 4fe863d

Browse files
committed
fix llm
1 parent b7bc7fe commit 4fe863d

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

_unittests/ut_torch_models/test_hghub_api.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,16 @@ def test_task_from_id(self):
4444
for name, etask in [
4545
("arnir0/Tiny-LLM", "text-generation"),
4646
("microsoft/phi-2", "text-generation"),
47+
]:
48+
with self.subTest(name=name, task=etask):
49+
task = task_from_id(name, True)
50+
self.assertEqual(etask, task)
51+
52+
@requires_transformers("4.50")
53+
@requires_torch("2.7")
54+
@never_test()
55+
def test_task_from_id_long(self):
56+
for name, etask in [
4757
("microsoft/Phi-3.5-mini-instruct", "text-generation"),
4858
("microsoft/Phi-3.5-vision-instruct", "text-generation"),
4959
]:

onnx_diagnostic/torch_models/hghub/model_inputs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
@functools.cache
13-
def config_class_from_architecture(arch: str, exc: bool = False) -> type:
13+
def config_class_from_architecture(arch: str, exc: bool = False) -> Optional[type]:
1414
"""
1515
Retrieves the configuration class for a given architecture.
1616

0 commit comments

Comments
 (0)