@@ -75,16 +75,6 @@ def test_get_untrained_model_with_inputs_beit(self):
7575 # different expected value for different version of transformers
7676 self .assertIn ((data ["size" ], data ["n_weights" ]), [(111448 , 27862 ), (56880 , 14220 )])
7777
78- @hide_stdout ()
79- @ignore_errors (OSError )
80- def test_get_untrained_model_with_inputs_codellama (self ):
81- mid = "codellama/CodeLlama-7b-Python-hf"
82- data = get_untrained_model_with_inputs (mid , verbose = 1 )
83- model , inputs = data ["model" ], data ["inputs" ]
84- model (** inputs )
85- # different expected value for different version of transformers
86- self .assertIn ((data ["size" ], data ["n_weights" ]), [(547377152 , 136844288 )])
87-
8878 @hide_stdout ()
8979 @ignore_errors (OSError )
9080 def test_get_untrained_model_with_inputs_clip_vit (self ):
@@ -129,11 +119,11 @@ def _diff(c1, c2):
129119 try :
130120 model (** inputs )
131121 except Exception as e :
132- diff = _diff (get_pretrained_config (mid ), data ["configuration" ])
122+ cf = get_pretrained_config (mid , use_only_preinstalled = True )
123+ diff = _diff (cf , data ["configuration" ])
133124 raise AssertionError (
134125 f"Computation failed due to { e } .\n --- pretrained\n "
135- f"{ pprint .pformat (get_pretrained_config (mid ))} \n "
136- f"--- modified\n { data ['configuration' ]} \n "
126+ f"{ pprint .pformat (cf )} \n --- modified\n { data ['configuration' ]} \n "
137127 f"--- diff\n { diff } "
138128 ) from e
139129 # different expected value for different version of transformers
0 commit comments