@@ -483,14 +483,6 @@ def _validate_outputs(self, model_arch, suffix, batch_size):
483483 f"Inference results between pytorch model and neuron model of { model_arch } not close enough."
484484 )
485485
486- def test_load_vanilla_transformers_which_is_not_supported (self ):
487- with self .assertRaises (Exception ) as context :
488- _ = NeuronModelForMaskedLM .from_pretrained (
489- "hf-internal-testing/tiny-random-t5" , from_transformers = True , ** self .STATIC_INPUTS_SHAPES
490- )
491-
492- self .assertIn ("Unrecognized configuration class" , str (context .exception ))
493-
494486 @parameterized .expand (SUPPORTED_ARCHITECTURES , skip_on_empty = True )
495487 def test_compare_to_transformers_non_dyn_bs (self , model_arch ):
496488 model_args = {
@@ -603,14 +595,6 @@ def _validate_outputs(self, model_arch, suffix, batch_size):
603595 if not result_close_end_logits :
604596 warnings .warn (f"End logits between pytorch model and neuron model of { model_arch } not close enough." )
605597
606- def test_load_vanilla_transformers_which_is_not_supported (self ):
607- with self .assertRaises (Exception ) as context :
608- _ = NeuronModelForQuestionAnswering .from_pretrained (
609- "hf-internal-testing/tiny-random-t5" , from_transformers = True , ** self .STATIC_INPUTS_SHAPES
610- )
611-
612- assert ("doesn't support" in str (context .exception )) or ("is not supported" in str (context .exception ))
613-
614598 def test_compare_to_transformers_dyn_bs (self ):
615599 model_arch = "albert"
616600 # Neuron model with dynamic batching
@@ -719,14 +703,6 @@ def _validate_outputs(self, model_arch, suffix, batch_size):
719703 f"Inference results between pytorch model and neuron model of { model_arch } not close enough."
720704 )
721705
722- def test_load_vanilla_transformers_which_is_not_supported (self ):
723- with self .assertRaises (Exception ) as context :
724- _ = NeuronModelForSequenceClassification .from_pretrained (
725- "hf-internal-testing/tiny-random-t5" , from_transformers = True , ** self .STATIC_INPUTS_SHAPES
726- )
727-
728- assert ("doesn't support" in str (context .exception )) or ("is not supported" in str (context .exception ))
729-
730706 @parameterized .expand (SUPPORTED_ARCHITECTURES , skip_on_empty = True )
731707 def test_compare_to_transformers_non_dyn_bs (self , model_arch ):
732708 model_args = {
@@ -831,14 +807,6 @@ def _validate_outputs(self, model_arch, suffix, batch_size):
831807 f"Inference results between pytorch model and neuron model of { model_arch } not close enough."
832808 )
833809
834- def test_load_vanilla_transformers_which_is_not_supported (self ):
835- with self .assertRaises (Exception ) as context :
836- _ = NeuronModelForTokenClassification .from_pretrained (
837- "hf-internal-testing/tiny-random-t5" , from_transformers = True , ** self .STATIC_INPUTS_SHAPES
838- )
839-
840- assert ("doesn't support" in str (context .exception )) or ("is not supported" in str (context .exception ))
841-
842810 @parameterized .expand (SUPPORTED_ARCHITECTURES , skip_on_empty = True )
843811 def test_compare_to_transformers_non_dyn_bs (self , model_arch ):
844812 model_args = {
@@ -987,7 +955,7 @@ class NeuronModelForImageClassificationIntegrationTest(NeuronModelTestMixin):
987955 "cvt" ,
988956 "deit" ,
989957 "levit" ,
990- "mobilenet-v2 " ,
958+ "mobilenet_v2 " ,
991959 "mobilevit" ,
992960 "swin" ,
993961 "vit" ,
@@ -1046,11 +1014,6 @@ def test_compare_to_transformers_non_dyn_bs(self, model_arch):
10461014 "model_arch" : model_arch ,
10471015 "dynamic_batch_size" : False ,
10481016 }
1049- # REMOVEME: convnextv2 contains a bug in the GRN layer, which is used in the convnextv2 model, but the bug has
1050- # been fixed in the transformers library on newer versions. For more info see:
1051- # https://github.com/huggingface/transformers/issues/38015
1052- if model_arch == "convnextv2" and transformers_version .startswith ("4.51" ):
1053- self .skipTest ("convnextv2 contains a bug in this version of transformers." )
10541017 self ._setup (model_args )
10551018 self ._validate_outputs (model_arch , "_dyn_bs_false" , batch_size = 1 )
10561019
0 commit comments