From 73a19499034fa333415f1559cf48c8bd78349999 Mon Sep 17 00:00:00 2001 From: Aleks Knezevic Date: Mon, 27 Jan 2025 10:46:00 -0500 Subject: [PATCH] Only enable a few tests, revert --- .github/workflows/run-model-tests.yml | 112 +++++++++--------- .../test_albert_token_classification.py | 3 +- tests/models/yolos/test_yolos.py | 2 +- 3 files changed, 59 insertions(+), 58 deletions(-) diff --git a/.github/workflows/run-model-tests.yml b/.github/workflows/run-model-tests.yml index c2e75ca8..c9c258cd 100644 --- a/.github/workflows/run-model-tests.yml +++ b/.github/workflows/run-model-tests.yml @@ -16,69 +16,69 @@ jobs: build: [ { runs-on: n150, name: "run1", tests: "\ - tests/models/MobileNetV2/test_MobileNetV2.py::test_MobileNetV2 - tests/models/Qwen/test_qwen2_casual_lm.py::test_qwen2_casual_lm - tests/models/Qwen/test_qwen2_token_classification.py::test_qwen2_token_classification - tests/models/RMBG/test_RMBG.py::test_RMBG - tests/models/albert/test_albert_masked_lm.py::test_albert_masked_lm - tests/models/albert/test_albert_question_answering.py::test_albert_question_answering - tests/models/albert/test_albert_sequence_classification.py::test_albert_sequence_classification + # tests/models/MobileNetV2/test_MobileNetV2.py::test_MobileNetV2 + # tests/models/Qwen/test_qwen2_casual_lm.py::test_qwen2_casual_lm + # tests/models/Qwen/test_qwen2_token_classification.py::test_qwen2_token_classification + # tests/models/RMBG/test_RMBG.py::test_RMBG + # tests/models/albert/test_albert_masked_lm.py::test_albert_masked_lm + # tests/models/albert/test_albert_question_answering.py::test_albert_question_answering + # tests/models/albert/test_albert_sequence_classification.py::test_albert_sequence_classification tests/models/albert/test_albert_token_classification.py::test_albert_token_classification - tests/models/clip/test_clip.py::test_clip - tests/models/codegen/test_codegen.py::test_codegen - tests/models/flan_t5/test_flan_t5.py::test_flan_t5 - tests/models/glpn_kitti/test_glpn_kitti.py::test_glpn_kitti - tests/models/mgp-str-base/test_mgp_str_base.py::test_mgp_str_base - tests/models/mlpmixer/test_mlpmixer.py::test_mlpmixer - tests/models/mnist/test_mnist.py::test_mnist_train - tests/models/musicgen_small/test_musicgen_small.py::test_musicgen_small - tests/models/resnet/test_resnet.py::test_resnet - tests/models/resnet50/test_resnet50.py::test_resnet - tests/models/segformer/test_segformer.py::test_segformer - tests/models/stable_diffusion/test_stable_diffusion.py::test_stable_diffusion - tests/models/stable_diffusion/test_stable_diffusion_v2.py::test_stable_diffusion_v2 - tests/models/torchvision/test_torchvision_image_classification.py::test_torchvision_image_classification - tests/models/torchvision/test_torchvision_object_detection.py::test_torchvision_object_detection - tests/models/unet_carvana/test_unet_carvana.py::test_unet_carvana - tests/models/vilt/test_vilt.py::test_vilt + # tests/models/clip/test_clip.py::test_clip + # tests/models/codegen/test_codegen.py::test_codegen + # tests/models/flan_t5/test_flan_t5.py::test_flan_t5 + # tests/models/glpn_kitti/test_glpn_kitti.py::test_glpn_kitti + # tests/models/mgp-str-base/test_mgp_str_base.py::test_mgp_str_base + # tests/models/mlpmixer/test_mlpmixer.py::test_mlpmixer + # tests/models/mnist/test_mnist.py::test_mnist_train + # tests/models/musicgen_small/test_musicgen_small.py::test_musicgen_small + # tests/models/resnet/test_resnet.py::test_resnet + # tests/models/resnet50/test_resnet50.py::test_resnet + # tests/models/segformer/test_segformer.py::test_segformer + # tests/models/stable_diffusion/test_stable_diffusion.py::test_stable_diffusion + # tests/models/stable_diffusion/test_stable_diffusion_v2.py::test_stable_diffusion_v2 + # tests/models/torchvision/test_torchvision_image_classification.py::test_torchvision_image_classification + # tests/models/torchvision/test_torchvision_object_detection.py::test_torchvision_object_detection + # tests/models/unet_carvana/test_unet_carvana.py::test_unet_carvana + # tests/models/vilt/test_vilt.py::test_vilt tests/models/yolos/test_yolos.py::test_yolos " }, { runs-on: n150, name: "run2", tests: "\ - tests/models/autoencoder_conv/test_autoencoder_conv.py::test_autoencoder_conv \ - tests/models/autoencoder_conv/test_autoencoder_conv_v2.py::test_autoencoder_conv_v2 \ - tests/models/autoencoder_linear/test_autoencoder_linear.py::test_autoencoder_linear \ - tests/models/beit/test_beit_image_classification.py::test_beit_image_classification \ - tests/models/bert/test_bert.py::test_bert \ - tests/models/bloom/test_bloom.py::test_bloom - tests/models/deit/test_deit.py::test_deit \ - tests/models/detr/test_detr.py::test_detr \ - tests/models/distilbert/test_distilbert.py::test_distilbert \ - tests/models/dpr/test_dpr.py::test_dpr \ - tests/models/gpt2/test_gpt2.py::test_gpt2 \ - tests/models/hand_landmark/test_hand_landmark.py::test_hand_landmark \ - tests/models/hardnet/test_hardnet.py::test_hardnet \ - tests/models/llama/test_llama.py::test_llama \ - tests/models/mobilenet_ssd/test_mobilenet_ssd.py::test_mobilenet_ssd \ - tests/models/openpose/test_openpose.py::test_openpose \ - tests/models/openpose/test_openpose_v2.py::test_openpose_v2 \ - tests/models/opt/test_opt.py::test_opt \ - tests/models/perceiver_io/test_perceiver_io.py::test_perceiver_io \ - tests/models/roberta/test_roberta.py::test_roberta \ - tests/models/segment_anything/test_segment_anything.py::test_segment_anything \ - tests/models/speecht5_tts/test_speecht5_tts.py::test_speecht5_tts \ - tests/models/squeeze_bert/test_squeeze_bert.py::test_squeeze_bert \ - tests/models/t5/test_t5.py::test_t5 \ - tests/models/timm/test_timm_image_classification.py::test_timm_image_classification \ - tests/models/unet/test_unet.py::test_unet \ - tests/models/unet_brain/test_unet_brain.py::test_unet_brain \ - tests/models/whisper/test_whisper.py::test_whisper \ - tests/models/xglm/test_xglm.py::test_xglm \ - tests/models/yolov3/test_yolov3.py::test_yolov3 \ - tests/models/yolov5/test_yolov5.py::test_yolov5 \ - tests/models/falcon/test_falcon.py::test_falcon \ + # tests/models/autoencoder_conv/test_autoencoder_conv.py::test_autoencoder_conv \ + # tests/models/autoencoder_conv/test_autoencoder_conv_v2.py::test_autoencoder_conv_v2 \ + # tests/models/autoencoder_linear/test_autoencoder_linear.py::test_autoencoder_linear \ + # tests/models/beit/test_beit_image_classification.py::test_beit_image_classification \ + # tests/models/bert/test_bert.py::test_bert \ + # tests/models/bloom/test_bloom.py::test_bloom + # tests/models/deit/test_deit.py::test_deit \ + # tests/models/detr/test_detr.py::test_detr \ + # tests/models/distilbert/test_distilbert.py::test_distilbert \ + # tests/models/dpr/test_dpr.py::test_dpr \ + # tests/models/gpt2/test_gpt2.py::test_gpt2 \ + # tests/models/hand_landmark/test_hand_landmark.py::test_hand_landmark \ + # tests/models/hardnet/test_hardnet.py::test_hardnet \ + # tests/models/llama/test_llama.py::test_llama \ + # tests/models/mobilenet_ssd/test_mobilenet_ssd.py::test_mobilenet_ssd \ + # tests/models/openpose/test_openpose.py::test_openpose \ + # tests/models/openpose/test_openpose_v2.py::test_openpose_v2 \ + # tests/models/opt/test_opt.py::test_opt \ + # tests/models/perceiver_io/test_perceiver_io.py::test_perceiver_io \ + # tests/models/roberta/test_roberta.py::test_roberta \ + # tests/models/segment_anything/test_segment_anything.py::test_segment_anything \ + # tests/models/speecht5_tts/test_speecht5_tts.py::test_speecht5_tts \ + # tests/models/squeeze_bert/test_squeeze_bert.py::test_squeeze_bert \ + # tests/models/t5/test_t5.py::test_t5 \ + # tests/models/timm/test_timm_image_classification.py::test_timm_image_classification \ + # tests/models/unet/test_unet.py::test_unet \ + # tests/models/unet_brain/test_unet_brain.py::test_unet_brain \ + # tests/models/whisper/test_whisper.py::test_whisper \ + # tests/models/xglm/test_xglm.py::test_xglm \ + # tests/models/yolov3/test_yolov3.py::test_yolov3 \ + # tests/models/yolov5/test_yolov5.py::test_yolov5 \ tests/models/gpt_neo/test_gpt_neo.py::test_gpt_neo \ + tests/models/falcon/test_falcon.py::test_falcon \ " }, ] diff --git a/tests/models/albert/test_albert_token_classification.py b/tests/models/albert/test_albert_token_classification.py index 64d372ba..4e83cf78 100644 --- a/tests/models/albert/test_albert_token_classification.py +++ b/tests/models/albert/test_albert_token_classification.py @@ -57,7 +57,8 @@ def test_albert_token_classification(record_property, model_name, mode, op_by_op # there might be more predicted token classes than words. # Multiple token classes might account for the same word predicted_tokens_classes = [ - tester.model.config.id2label[t.item()] for t in predicted_token_class_ids[0] + tester.framework_model.config.id2label[t.item()] + for t in predicted_token_class_ids[0] ] input_ids = tester.inputs["input_ids"] diff --git a/tests/models/yolos/test_yolos.py b/tests/models/yolos/test_yolos.py index 17deee7f..b23f8b1a 100644 --- a/tests/models/yolos/test_yolos.py +++ b/tests/models/yolos/test_yolos.py @@ -72,7 +72,7 @@ def interpret_results(decoded_output): ): box = [round(i, 2) for i in box.tolist()] string = ( - f"Detected {tester.model.config.id2label[label.item()]} with confidence " + f"Detected {tester.framework_model.config.id2label[label.item()]} with confidence " f"{round(score.item(), 3)} at location {box}" ) return string