File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
_unittests/ut_torch_models
onnx_diagnostic/torch_models/hghub Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff 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 ]:
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments