diff --git a/qa/L0_lifecycle/lifecycle_test.py b/qa/L0_lifecycle/lifecycle_test.py index 00d052c17ff..a2bfc067bc9 100755 --- a/qa/L0_lifecycle/lifecycle_test.py +++ b/qa/L0_lifecycle/lifecycle_test.py @@ -3406,8 +3406,7 @@ def test_shutdown_with_live_connection(self): ) def test_add_custom_config(self): - models_base = ("savedmodel", "plan") - models_shape = ((1, 16), (1, 16)) + models_base = ("savedmodel",) models = list() for m in models_base: models.append(tu.get_model_name(m, np.float32, np.float32, np.float32)) @@ -3427,55 +3426,6 @@ def test_add_custom_config(self): except Exception as ex: self.assertTrue(False, "unexpected error {}".format(ex)) - # Run inference on the model on all versions. Only version 1, 3 should work. - for model_name, model_shape in zip(models_base, models_shape): - try: - iu.infer_exact( - self, - model_name, - model_shape, - 1, - np.float32, - np.float32, - np.float32, - swap=False, - model_version=1, - ) - except Exception as ex: - self.assertTrue(False, "unexpected error {}".format(ex)) - - try: - iu.infer_exact( - self, - model_name, - model_shape, - 1, - np.float32, - np.float32, - np.float32, - swap=True, - model_version=3, - ) - except Exception as ex: - self.assertTrue(False, "unexpected error {}".format(ex)) - - try: - iu.infer_exact( - self, - model_name, - model_shape, - 1, - np.float32, - np.float32, - np.float32, - model_version=2, - ) - self.assertTrue( - False, "expected error for unavailable model " + model_name - ) - except Exception as ex: - self.assertIn("Request for unknown model", ex.message()) - # Add custom model configuration, which cause model to be # re-loaded and use custom config inside configs folder, which # means that version policy will change and only version 2 will @@ -3501,60 +3451,8 @@ def test_add_custom_config(self): except Exception as ex: self.assertTrue(False, "unexpected error {}".format(ex)) - # Only version 2 should work. - for model_name, model_shape in zip(models_base, models_shape): - try: - iu.infer_exact( - self, - model_name, - model_shape, - 1, - np.float32, - np.float32, - np.float32, - swap=True, - model_version=2, - ) - except Exception as ex: - self.assertTrue(False, "unexpected error {}".format(ex)) - - try: - iu.infer_exact( - self, - model_name, - model_shape, - 1, - np.float32, - np.float32, - np.float32, - model_version=1, - ) - self.assertTrue( - False, "expected error for unavailable model " + model_name - ) - except Exception as ex: - self.assertIn("Request for unknown model", ex.message()) - - try: - iu.infer_exact( - self, - model_name, - model_shape, - 1, - np.float32, - np.float32, - np.float32, - model_version=3, - ) - self.assertTrue( - False, "expected error for unavailable model " + model_name - ) - except Exception as ex: - self.assertIn("Request for unknown model", ex.message()) - def test_delete_custom_config(self): - models_base = ("savedmodel", "plan") - models_shape = ((1, 16), (1, 16)) + models_base = ("savedmodel",) models = list() for m in models_base: models.append(tu.get_model_name(m, np.float32, np.float32, np.float32)) @@ -3574,57 +3472,6 @@ def test_delete_custom_config(self): except Exception as ex: self.assertTrue(False, "unexpected error {}".format(ex)) - # Run inference on the model on all versions. Only version 2 should work. - for model_name, model_shape in zip(models_base, models_shape): - try: - iu.infer_exact( - self, - model_name, - model_shape, - 1, - np.float32, - np.float32, - np.float32, - swap=True, - model_version=2, - ) - except Exception as ex: - self.assertTrue(False, "unexpected error {}".format(ex)) - - try: - iu.infer_exact( - self, - model_name, - model_shape, - 1, - np.float32, - np.float32, - np.float32, - model_version=1, - ) - self.assertTrue( - False, "expected error for unavailable model " + model_name - ) - except Exception as ex: - self.assertIn("Request for unknown model", ex.message()) - - try: - iu.infer_exact( - self, - model_name, - model_shape, - 1, - np.float32, - np.float32, - np.float32, - model_version=3, - ) - self.assertTrue( - False, "expected error for unavailable model " + model_name - ) - except Exception as ex: - self.assertIn("Request for unknown model", ex.message()) - # Delete custom model configuration, which cause model to be # re-loaded and use default config, which means that version # policy will be changed and so only version 1, 3 will be available @@ -3646,55 +3493,6 @@ def test_delete_custom_config(self): except Exception as ex: self.assertTrue(False, "unexpected error {}".format(ex)) - # Only version 1, 3 should work. - for model_name, model_shape in zip(models_base, models_shape): - try: - iu.infer_exact( - self, - model_name, - model_shape, - 1, - np.float32, - np.float32, - np.float32, - swap=False, - model_version=1, - ) - except Exception as ex: - self.assertTrue(False, "unexpected error {}".format(ex)) - - try: - iu.infer_exact( - self, - model_name, - model_shape, - 1, - np.float32, - np.float32, - np.float32, - swap=True, - model_version=3, - ) - except Exception as ex: - self.assertTrue(False, "unexpected error {}".format(ex)) - - try: - iu.infer_exact( - self, - model_name, - model_shape, - 1, - np.float32, - np.float32, - np.float32, - model_version=2, - ) - self.assertTrue( - False, "expected error for unavailable model " + model_name - ) - except Exception as ex: - self.assertIn("Request for unknown model", ex.message()) - if __name__ == "__main__": unittest.main() diff --git a/qa/L0_lifecycle/test.sh b/qa/L0_lifecycle/test.sh index 7add3e512ce..9236fdabfb3 100755 --- a/qa/L0_lifecycle/test.sh +++ b/qa/L0_lifecycle/test.sh @@ -2136,7 +2136,7 @@ LOG_IDX=$((LOG_IDX+1)) # LifeCycleTest.test_add_custom_config rm -fr models config.pbtxt.* mkdir models -for i in savedmodel plan ; do +for i in savedmodel; do cp -r $DATADIR/qa_model_repository/${i}_float32_float32_float32 models/. mkdir models/${i}_float32_float32_float32/configs sed 's/^version_policy:.*/version_policy: { specific: { versions: [2] }}/' \ @@ -2168,7 +2168,7 @@ LOG_IDX=$((LOG_IDX+1)) # LifeCycleTest.test_delete_custom_config rm -fr models config.pbtxt.* mkdir models -for i in savedmodel plan ; do +for i in savedmodel; do cp -r $DATADIR/qa_model_repository/${i}_float32_float32_float32 models/. mkdir models/${i}_float32_float32_float32/configs sed 's/^version_policy:.*/version_policy: { specific: { versions: [2] }}/' \