Repository: kserve/kserve

Issue:
Concerns on default KFSERVING_VERSION in python SDK 
/kind bug

Curious what's the considerations in our python SDK https://github.com/kubeflow/kfserving/blob/master/python/kfserving/kfserving/constants/constants.py#L23 that we default KFSERVING_VERSION to v1alpha2 instead of v1beta1? The mismatch between the default value and the cluster KFServing version can create pitfalls sometimes.



Discussion:
@Peilun-Li this constant is only used in [e2e tests](https://github.com/kubeflow/kfserving/search?q=KFSERVING_VERSION) looks, in the KFS client API we are defaulting to v1beta1 https://github.com/kubeflow/kfserving/blob/42007c532286a1e43893ef2be03b15e104bfd7a4/python/kfserving/kfserving/api/kf_serving_client.py#L310

Resolving patch:
diff --git a/python/kfserving/kfserving/api/kf_serving_client.py b/python/kfserving/kfserving/api/kf_serving_client.py
--- a/python/kfserving/kfserving/api/kf_serving_client.py
+++ b/python/kfserving/kfserving/api/kf_serving_client.py
@@ -262,7 +262,7 @@ def replace(self, name, inferenceservice, namespace=None, watch=False,
         else:
             return outputs
 
-    def delete(self, name, namespace=None, version=constants.KFSERVING_VERSION):
+    def delete(self, name, namespace=None, version=constants.KFSERVING_V1BETA1_VERSION):
         """
         Delete the inference service
         :param name: inference service name
diff --git a/python/kfserving/kfserving/constants/constants.py b/python/kfserving/kfserving/constants/constants.py
--- a/python/kfserving/kfserving/constants/constants.py
+++ b/python/kfserving/kfserving/constants/constants.py
@@ -20,11 +20,10 @@
 KFSERVING_PLURAL = 'inferenceservices'
 KFSERVING_KIND_TRAINEDMODEL = 'TrainedModel'
 KFSERVING_PLURAL_TRAINEDMODEL = 'trainedmodels'
-KFSERVING_VERSION = os.environ.get('KFSERVING_VERSION', 'v1alpha2')
 KFSERVING_V1BETA1_VERSION = 'v1beta1'
 KFSERVING_V1ALPHA2_VERSION = 'v1alpha2'
 KFSERVING_V1ALPHA1_VERSION = "v1alpha1"
-KFSERVING_API_VERSION = KFSERVING_GROUP + '/' + KFSERVING_VERSION
+
 KFSERVING_V1BETA1 = KFSERVING_GROUP + '/' + KFSERVING_V1BETA1_VERSION
 KFSERVING_V1ALPHA2 = KFSERVING_GROUP + '/' + KFSERVING_V1ALPHA2_VERSION
 KFSERVING_V1ALPHA1 = KFSERVING_GROUP + '/' + KFSERVING_V1ALPHA1_VERSION


Test patch:
diff --git a/test/e2e/batcher/test_batcher.py b/test/e2e/batcher/test_batcher.py
--- a/test/e2e/batcher/test_batcher.py
+++ b/test/e2e/batcher/test_batcher.py
@@ -17,51 +17,50 @@
 
 from kfserving import KFServingClient
 from kfserving import constants
-from kfserving import V1alpha2EndpointSpec
-from kfserving import V1alpha2PredictorSpec
-from kfserving import V1alpha2Batcher
-from kfserving import V1alpha2PyTorchSpec
-from kfserving import V1alpha2InferenceServiceSpec
-from kfserving import V1alpha2InferenceService
+from kfserving import V1beta1PredictorSpec
+from kfserving import V1beta1Batcher
+from kfserving import V1beta1TorchServeSpec
+from kfserving import V1beta1InferenceServiceSpec
+from kfserving import V1beta1InferenceService
 from kubernetes.client import V1ResourceRequirements
 from ..common.utils import predict
 from ..common.utils import KFSERVING_TEST_NAMESPACE
 from concurrent import futures
 
-api_version = constants.KFSERVING_GROUP + '/' + constants.KFSERVING_VERSION
 KFServing = KFServingClient(config_file=os.environ.get("KUBECONFIG", "~/.kube/config"))
 
 
 def test_batcher():
     service_name = 'isvc-pytorch-batcher'
-    default_endpoint_spec = V1alpha2EndpointSpec(
-        predictor=V1alpha2PredictorSpec(
-            batcher=V1alpha2Batcher(
-                max_batch_size=32,
-                max_latency=5000,
-                timeout=60
-            ),
-            min_replicas=1,
-            pytorch=V1alpha2PyTorchSpec(
-                storage_uri='gs://kfserving-samples/models/pytorch/cifar10',
-                model_class_name='Net',
-                resources=V1ResourceRequirements(
-                    requests={'cpu': '100m', 'memory': '2Gi'},
-                    limits={'cpu': '100m', 'memory': '2Gi'}))))
+    predictor = V1beta1PredictorSpec(
+        batcher=V1beta1Batcher(
+            max_batch_size=32,
+            max_latency=5000,
+        ),
+        min_replicas=1,
+        pytorch=V1beta1TorchServeSpec(
+            storage_uri='gs://kfserving-samples/models/pytorch/cifar10',
+            model_class_name='Net',
+            resources=V1ResourceRequirements(
+                requests={'cpu': '100m', 'memory': '2Gi'},
+                limits={'cpu': '100m', 'memory': '2Gi'}
+            )
+        )
+    )
 
-    isvc = V1alpha2InferenceService(api_version=api_version,
-                                    kind=constants.KFSERVING_KIND,
-                                    metadata=client.V1ObjectMeta(
-                                        name=service_name,
-                                        namespace=KFSERVING_TEST_NAMESPACE
-                                    ),
-                                    spec=V1alpha2InferenceServiceSpec(default=default_endpoint_spec))
+    isvc = V1beta1InferenceService(api_version=constants.KFSERVING_V1BETA1,
+                                   kind=constants.KFSERVING_KIND,
+                                   metadata=client.V1ObjectMeta(
+                                       name=service_name,
+                                       namespace=KFSERVING_TEST_NAMESPACE
+                                   ),
+                                   spec=V1beta1InferenceServiceSpec(predictor=predictor))
     KFServing.create(isvc)
     try:
         KFServing.wait_isvc_ready(service_name, namespace=KFSERVING_TEST_NAMESPACE)
     except RuntimeError as e:
         print(KFServing.api_instance.get_namespaced_custom_object("serving.knative.dev", "v1", KFSERVING_TEST_NAMESPACE,
-                                                                  "services", service_name + "-predictor"))
+                                                                  "services", service_name + "-predictor-default"))
         pods = KFServing.core_api.list_namespaced_pod(KFSERVING_TEST_NAMESPACE,
                                                       label_selector='serving.kubeflow.org/inferenceservice={}'.
                                                       format(service_name))
diff --git a/test/e2e/explainer/test_aix_explainer.py b/test/e2e/explainer/test_aix_explainer.py
--- a/test/e2e/explainer/test_aix_explainer.py
+++ b/test/e2e/explainer/test_aix_explainer.py
@@ -19,13 +19,11 @@
 
 from kfserving import KFServingClient
 from kfserving import constants
-from kfserving import V1alpha2EndpointSpec
-from kfserving import V1alpha2PredictorSpec
-from kfserving import V1alpha2InferenceServiceSpec
-from kfserving import V1alpha2ExplainerSpec
-from kfserving import V1alpha2AIXExplainerSpec
-from kfserving import V1alpha2InferenceService
-from kfserving import V1alpha2CustomSpec
+from kfserving import V1beta1PredictorSpec
+from kfserving import V1beta1InferenceServiceSpec
+from kfserving import V1beta1ExplainerSpec
+from kfserving import V1beta1AIXExplainerSpec
+from kfserving import V1beta1InferenceService
 from kubernetes.client import V1ResourceRequirements
 from kubernetes.client import V1Container
 
@@ -36,36 +34,36 @@
 import numpy as np
 
 logging.basicConfig(level=logging.INFO)
-api_version = constants.KFSERVING_GROUP + '/' + constants.KFSERVING_VERSION
 KFServing = KFServingClient(config_file=os.environ.get("KUBECONFIG", "~/.kube/config"))
 
 
 def test_tabular_explainer():
     service_name = 'aix-explainer'
-    default_endpoint_spec = V1alpha2EndpointSpec(
-        predictor=V1alpha2PredictorSpec(
-            custom=V1alpha2CustomSpec(
-                container=V1Container(
+    predictor = V1beta1PredictorSpec(
+        containers=[V1Container(
                     name="predictor",
                     image='aipipeline/rf-predictor:0.4.0',
                     command=["python", "-m", "rfserver", "--model_name", "aix-explainer"],
                     resources=V1ResourceRequirements(
                         requests={'cpu': '500m', 'memory': '1Gi'},
-                        limits={'cpu': '500m', 'memory': '1Gi'})
-                ))),
-        explainer=V1alpha2ExplainerSpec(
-            min_replicas=1,
-            aix=V1alpha2AIXExplainerSpec(
-                type='LimeImages',
-                resources=V1ResourceRequirements(
-                    requests={'cpu': '500m', 'memory': '1Gi'},
-                    limits={'cpu': '500m', 'memory': '1Gi'}))))
+                        limits={'cpu': '500m', 'memory': '1Gi'}))]
+    )
+    explainer = V1beta1ExplainerSpec(
+        min_replicas=1,
+        aix=V1beta1AIXExplainerSpec(
+            name='explainer',
+            type='LimeImages',
+            resources=V1ResourceRequirements(
+                requests={'cpu': '500m', 'memory': '1Gi'},
+                limits={'cpu': '500m', 'memory': '1Gi'})
+        )
+    )
 
-    isvc = V1alpha2InferenceService(api_version=api_version,
-                                    kind=constants.KFSERVING_KIND,
-                                    metadata=client.V1ObjectMeta(
-                                        name=service_name, namespace=KFSERVING_TEST_NAMESPACE),
-                                    spec=V1alpha2InferenceServiceSpec(default=default_endpoint_spec))
+    isvc = V1beta1InferenceService(api_version=constants.KFSERVING_V1BETA1,
+                                   kind=constants.KFSERVING_KIND,
+                                   metadata=client.V1ObjectMeta(
+                                       name=service_name, namespace=KFSERVING_TEST_NAMESPACE),
+                                   spec=V1beta1InferenceServiceSpec(predictor=predictor, explainer=explainer))
 
     KFServing.create(isvc)
     try:
diff --git a/test/e2e/explainer/test_art_explainer.py b/test/e2e/explainer/test_art_explainer.py
--- a/test/e2e/explainer/test_art_explainer.py
+++ b/test/e2e/explainer/test_art_explainer.py
@@ -31,14 +31,12 @@
 from ..common.utils import KFSERVING_TEST_NAMESPACE
 
 logging.basicConfig(level=logging.INFO)
-kfserving_version = 'v1beta1'
-api_version = constants.KFSERVING_GROUP + '/' + kfserving_version
 KFServing = KFServingClient(config_file=os.environ.get("KUBECONFIG", "~/.kube/config"))
 
 
 def test_tabular_explainer():
     service_name = 'art-explainer'
-    isvc = V1beta1InferenceService(api_version=api_version,
+    isvc = V1beta1InferenceService(api_version=constants.KFSERVING_V1BETA1,
                                    kind=constants.KFSERVING_KIND,
                                    metadata=client.V1ObjectMeta(
                                        name=service_name, namespace=KFSERVING_TEST_NAMESPACE),
@@ -79,4 +77,4 @@ def test_tabular_explainer():
 
     adv_prediction = explain_art(service_name, './data/mnist_input_bw.json')
     assert (adv_prediction != 3)
-    KFServing.delete(service_name, KFSERVING_TEST_NAMESPACE, version=kfserving_version)
+    KFServing.delete(service_name, KFSERVING_TEST_NAMESPACE)
diff --git a/test/e2e/explainer/test_tabular_explainer.py b/test/e2e/explainer/test_tabular_explainer.py
--- a/test/e2e/explainer/test_tabular_explainer.py
+++ b/test/e2e/explainer/test_tabular_explainer.py
@@ -18,13 +18,12 @@
 
 from kfserving import KFServingClient
 from kfserving import constants
-from kfserving import V1alpha2EndpointSpec
-from kfserving import V1alpha2PredictorSpec
-from kfserving import V1alpha2SKLearnSpec
-from kfserving import V1alpha2InferenceServiceSpec
-from kfserving import V1alpha2ExplainerSpec
-from kfserving import V1alpha2AlibiExplainerSpec
-from kfserving import V1alpha2InferenceService
+from kfserving import V1beta1PredictorSpec
+from kfserving import V1beta1SKLearnSpec
+from kfserving import V1beta1InferenceServiceSpec
+from kfserving import V1beta1ExplainerSpec
+from kfserving import V1beta1AlibiExplainerSpec
+from kfserving import V1beta1InferenceService
 from kubernetes.client import V1ResourceRequirements
 
 from ..common.utils import predict
@@ -32,33 +31,38 @@
 from ..common.utils import KFSERVING_TEST_NAMESPACE
 
 logging.basicConfig(level=logging.INFO)
-api_version = constants.KFSERVING_GROUP + '/' + constants.KFSERVING_VERSION
 KFServing = KFServingClient(config_file=os.environ.get("KUBECONFIG", "~/.kube/config"))
 
 
 def test_tabular_explainer():
     service_name = 'isvc-explainer-tabular'
-    default_endpoint_spec = V1alpha2EndpointSpec(
-        predictor=V1alpha2PredictorSpec(
-            sklearn=V1alpha2SKLearnSpec(
-                storage_uri='gs://seldon-models/sklearn/income/model',
-                resources=V1ResourceRequirements(
-                    requests={'cpu': '100m', 'memory': '1Gi'},
-                    limits={'cpu': '100m', 'memory': '1Gi'}))),
-        explainer=V1alpha2ExplainerSpec(
-            min_replicas=1,
-            alibi=V1alpha2AlibiExplainerSpec(
-                type='AnchorTabular',
-                storage_uri='gs://seldon-models/sklearn/income/explainer-py36-0.5.2',
-                resources=V1ResourceRequirements(
-                    requests={'cpu': '100m', 'memory': '1Gi'},
-                    limits={'cpu': '100m', 'memory': '1Gi'}))))
+    predictor = V1beta1PredictorSpec(
+        sklearn=V1beta1SKLearnSpec(
+            storage_uri='gs://seldon-models/sklearn/income/model',
+            resources=V1ResourceRequirements(
+                requests={'cpu': '100m', 'memory': '1Gi'},
+                limits={'cpu': '100m', 'memory': '1Gi'}
+            )
+        )
+    )
+    explainer = V1beta1ExplainerSpec(
+        min_replicas=1,
+        alibi=V1beta1AlibiExplainerSpec(
+            name='kfserving-container',
+            type='AnchorTabular',
+            storage_uri='gs://seldon-models/sklearn/income/explainer-py36-0.5.2',
+            resources=V1ResourceRequirements(
+                requests={'cpu': '100m', 'memory': '1Gi'},
+                limits={'cpu': '100m', 'memory': '1Gi'}
+            )
+        )
+    )
 
-    isvc = V1alpha2InferenceService(api_version=api_version,
-                                    kind=constants.KFSERVING_KIND,
-                                    metadata=client.V1ObjectMeta(
-                                        name=service_name, namespace=KFSERVING_TEST_NAMESPACE),
-                                    spec=V1alpha2InferenceServiceSpec(default=default_endpoint_spec))
+    isvc = V1beta1InferenceService(api_version=constants.KFSERVING_V1BETA1,
+                                   kind=constants.KFSERVING_KIND,
+                                   metadata=client.V1ObjectMeta(
+                                       name=service_name, namespace=KFSERVING_TEST_NAMESPACE),
+                                   spec=V1beta1InferenceServiceSpec(predictor=predictor, explainer=explainer))
 
     KFServing.create(isvc)
     try:
diff --git a/test/e2e/logger/test_logger.py b/test/e2e/logger/test_logger.py
--- a/test/e2e/logger/test_logger.py
+++ b/test/e2e/logger/test_logger.py
@@ -17,62 +17,58 @@
 
 from kfserving import KFServingClient
 from kfserving import constants
-from kfserving import V1alpha2EndpointSpec
-from kfserving import V1alpha2PredictorSpec
-from kfserving import V1alpha2CustomSpec
-from kfserving import V1alpha2SKLearnSpec
-from kfserving import V1alpha2InferenceServiceSpec
-from kfserving import V1alpha2InferenceService
-from kfserving import V1alpha2Logger
+from kfserving import V1beta1PredictorSpec
+from kfserving import V1beta1SKLearnSpec
+from kfserving import V1beta1InferenceServiceSpec
+from kfserving import V1beta1InferenceService
+from kfserving import V1beta1LoggerSpec
 from kubernetes.client import V1ResourceRequirements
 from kubernetes.client import V1Container
 from ..common.utils import predict
 from ..common.utils import KFSERVING_TEST_NAMESPACE
 import time
 
-api_version = constants.KFSERVING_GROUP + '/' + constants.KFSERVING_VERSION
 KFServing = KFServingClient(config_file=os.environ.get("KUBECONFIG", "~/.kube/config"))
 
 
 def test_kfserving_logger():
     msg_dumper = 'message-dumper'
-    default_endpoint_spec = V1alpha2EndpointSpec(
-        predictor=V1alpha2PredictorSpec(
-            min_replicas=1,
-            custom=V1alpha2CustomSpec(
-                container=V1Container(
-                    name="kfserving-container",
-                    image='gcr.io/knative-releases/knative.dev/eventing-contrib/cmd/event_display',
-                ))))
+    predictor = V1beta1PredictorSpec(
+        min_replicas=1,
+        containers=[V1Container(name="kfserving-container",
+                                image='gcr.io/knative-releases/knative.dev/eventing-contrib/cmd/event_display')]
+    )
 
-    isvc = V1alpha2InferenceService(api_version=api_version,
-                                    kind=constants.KFSERVING_KIND,
-                                    metadata=client.V1ObjectMeta(
+    isvc = V1beta1InferenceService(api_version=constants.KFSERVING_V1BETA1,
+                                   kind=constants.KFSERVING_KIND,
+                                   metadata=client.V1ObjectMeta(
                                         name=msg_dumper, namespace=KFSERVING_TEST_NAMESPACE),
-                                    spec=V1alpha2InferenceServiceSpec(default=default_endpoint_spec))
+                                   spec=V1beta1InferenceServiceSpec(predictor=predictor))
 
     KFServing.create(isvc)
     KFServing.wait_isvc_ready(msg_dumper, namespace=KFSERVING_TEST_NAMESPACE)
 
     service_name = 'isvc-logger'
-    default_endpoint_spec = V1alpha2EndpointSpec(
-        predictor=V1alpha2PredictorSpec(
-            min_replicas=1,
-            logger=V1alpha2Logger(
-               mode="all",
-               url="http://message-dumper."+KFSERVING_TEST_NAMESPACE+".svc.cluster.local"
-            ),
-            sklearn=V1alpha2SKLearnSpec(
-                storage_uri='gs://kfserving-samples/models/sklearn/iris',
-                resources=V1ResourceRequirements(
-                    requests={'cpu': '100m', 'memory': '256Mi'},
-                    limits={'cpu': '100m', 'memory': '256Mi'}))))
+    predictor = V1beta1PredictorSpec(
+        min_replicas=1,
+        logger=V1beta1LoggerSpec(
+            mode="all",
+            url="http://message-dumper."+KFSERVING_TEST_NAMESPACE+".svc.cluster.local"
+        ),
+        sklearn=V1beta1SKLearnSpec(
+            storage_uri='gs://kfserving-samples/models/sklearn/iris',
+            resources=V1ResourceRequirements(
+                requests={'cpu': '100m', 'memory': '256Mi'},
+                limits={'cpu': '100m', 'memory': '256Mi'}
+            )
+        )
+    )
 
-    isvc = V1alpha2InferenceService(api_version=api_version,
-                                    kind=constants.KFSERVING_KIND,
-                                    metadata=client.V1ObjectMeta(
-                                        name=service_name, namespace=KFSERVING_TEST_NAMESPACE),
-                                    spec=V1alpha2InferenceServiceSpec(default=default_endpoint_spec))
+    isvc = V1beta1InferenceService(api_version=constants.KFSERVING_V1BETA1,
+                                   kind=constants.KFSERVING_KIND,
+                                   metadata=client.V1ObjectMeta(
+                                       name=service_name, namespace=KFSERVING_TEST_NAMESPACE),
+                                   spec=V1beta1InferenceServiceSpec(predictor=predictor))
 
     KFServing.create(isvc)
     try:
diff --git a/test/e2e/predictor/test_lightgbm.py b/test/e2e/predictor/test_lightgbm.py
--- a/test/e2e/predictor/test_lightgbm.py
+++ b/test/e2e/predictor/test_lightgbm.py
@@ -17,52 +17,43 @@
 from kfserving import (
     KFServingClient,
     constants,
-    V1alpha2EndpointSpec,
-    V1alpha2PredictorSpec,
-    V1alpha2LightGBMSpec,
-    V1alpha2InferenceServiceSpec,
-    V1alpha2InferenceService
+    V1beta1PredictorSpec,
+    V1beta1LightGBMSpec,
+    V1beta1InferenceServiceSpec,
+    V1beta1InferenceService
 )
 from kubernetes.client import V1ResourceRequirements
 
 from ..common.utils import predict, KFSERVING_TEST_NAMESPACE
 
-api_version = f"{constants.KFSERVING_GROUP}/{constants.KFSERVING_VERSION}"
-api_v1beta1_version = (
-    f"{constants.KFSERVING_GROUP}/{constants.KFSERVING_V1BETA1_VERSION}"
-)
 KFServing = KFServingClient(config_file=os.environ.get("KUBECONFIG", "~/.kube/config"))
 
 
 def test_lightgbm_kfserving():
     service_name = "isvc-lightgbm"
-    default_endpoint_spec = V1alpha2EndpointSpec(
-        predictor=V1alpha2PredictorSpec(
-            min_replicas=1,
-            lightgbm=V1alpha2LightGBMSpec(
-                storage_uri="gs://kfserving-examples/models/lightgbm",
-                resources=V1ResourceRequirements(
-                    requests={"cpu": "100m", "memory": "256Mi"},
-                    limits={"cpu": "100m", "memory": "256Mi"},
-                ),
+    predictor = V1beta1PredictorSpec(
+        min_replicas=1,
+        lightgbm=V1beta1LightGBMSpec(
+            storage_uri="gs://kfserving-examples/models/lightgbm",
+            resources=V1ResourceRequirements(
+                requests={"cpu": "100m", "memory": "256Mi"},
+                limits={"cpu": "100m", "memory": "256Mi"},
             ),
-        )
+        ),
     )
 
-    isvc = V1alpha2InferenceService(
-        api_version=api_version,
+    isvc = V1beta1InferenceService(
+        api_version=constants.KFSERVING_V1BETA1,
         kind=constants.KFSERVING_KIND,
         metadata=client.V1ObjectMeta(
             name=service_name, namespace=KFSERVING_TEST_NAMESPACE
         ),
-        spec=V1alpha2InferenceServiceSpec(default=default_endpoint_spec),
+        spec=V1beta1InferenceServiceSpec(predictor=predictor),
     )
 
     KFServing.create(isvc)
-    KFServing.wait_isvc_ready(service_name, namespace=KFSERVING_TEST_NAMESPACE,
-                              version=constants.KFSERVING_VERSION)
+    KFServing.wait_isvc_ready(service_name, namespace=KFSERVING_TEST_NAMESPACE)
 
-    res = predict(service_name, "./data/iris_input_v3.json",
-                  version=constants.KFSERVING_VERSION)
+    res = predict(service_name, "./data/iris_input_v3.json")
     assert res["predictions"][0][0] > 0.5
     KFServing.delete(service_name, KFSERVING_TEST_NAMESPACE)
diff --git a/test/e2e/predictor/test_pmml.py b/test/e2e/predictor/test_pmml.py
--- a/test/e2e/predictor/test_pmml.py
+++ b/test/e2e/predictor/test_pmml.py
@@ -15,11 +15,10 @@
 import os
 
 from kfserving import KFServingClient
-from kfserving import V1alpha2EndpointSpec
-from kfserving import V1alpha2InferenceService
-from kfserving import V1alpha2InferenceServiceSpec
-from kfserving import V1alpha2PMMLSpec
-from kfserving import V1alpha2PredictorSpec
+from kfserving import V1beta1InferenceService
+from kfserving import V1beta1InferenceServiceSpec
+from kfserving import V1beta1PMMLSpec
+from kfserving import V1beta1PredictorSpec
 from kfserving import constants
 from kubernetes import client
 from kubernetes.client import V1ResourceRequirements
@@ -27,26 +26,27 @@
 from ..common.utils import KFSERVING_TEST_NAMESPACE
 from ..common.utils import predict
 
-api_version = constants.KFSERVING_GROUP + '/' + constants.KFSERVING_VERSION
 KFServing = KFServingClient(config_file=os.environ.get("KUBECONFIG", "~/.kube/config"))
 
 
 def test_pmml_kfserving():
     service_name = 'isvc-pmml'
-    default_endpoint_spec = V1alpha2EndpointSpec(
-        predictor=V1alpha2PredictorSpec(
-            min_replicas=1,
-            pmml=V1alpha2PMMLSpec(
-                storage_uri='gs://kfserving-examples/models/pmml',
-                resources=V1ResourceRequirements(
-                    requests={'cpu': '100m', 'memory': '256Mi'},
-                    limits={'cpu': '100m', 'memory': '256Mi'}))))
-
-    isvc = V1alpha2InferenceService(api_version=api_version,
-                                    kind=constants.KFSERVING_KIND,
-                                    metadata=client.V1ObjectMeta(
+    predictor = V1beta1PredictorSpec(
+        min_replicas=1,
+        pmml=V1beta1PMMLSpec(
+            storage_uri='gs://kfserving-examples/models/pmml',
+            resources=V1ResourceRequirements(
+                requests={'cpu': '100m', 'memory': '256Mi'},
+                limits={'cpu': '100m', 'memory': '256Mi'}
+            )
+        )
+    )
+
+    isvc = V1beta1InferenceService(api_version=constants.KFSERVING_V1BETA1,
+                                   kind=constants.KFSERVING_KIND,
+                                   metadata=client.V1ObjectMeta(
                                         name=service_name, namespace=KFSERVING_TEST_NAMESPACE),
-                                    spec=V1alpha2InferenceServiceSpec(default=default_endpoint_spec))
+                                   spec=V1beta1InferenceServiceSpec(predictor=predictor))
 
     KFServing.create(isvc)
     KFServing.wait_isvc_ready(service_name, namespace=KFSERVING_TEST_NAMESPACE)
diff --git a/test/e2e/predictor/test_pytorch.py b/test/e2e/predictor/test_pytorch.py
--- a/test/e2e/predictor/test_pytorch.py
+++ b/test/e2e/predictor/test_pytorch.py
@@ -18,37 +18,36 @@
 
 from kfserving import KFServingClient
 from kfserving import constants
-from kfserving import V1alpha2EndpointSpec
-from kfserving import V1alpha2PredictorSpec
-from kfserving import V1alpha2PyTorchSpec
-from kfserving import V1alpha2InferenceServiceSpec
-from kfserving import V1alpha2InferenceService
+from kfserving import V1beta1PredictorSpec
+from kfserving import V1beta1TorchServeSpec
+from kfserving import V1beta1InferenceServiceSpec
+from kfserving import V1beta1InferenceService
 from kubernetes.client import V1ResourceRequirements
 from ..common.utils import predict
 from ..common.utils import KFSERVING_TEST_NAMESPACE
 
-api_version = constants.KFSERVING_GROUP + '/' + constants.KFSERVING_VERSION
 KFServing = KFServingClient(config_file=os.environ.get("KUBECONFIG", "~/.kube/config"))
 
 
 def test_pytorch():
     service_name = 'isvc-pytorch'
-    default_endpoint_spec = V1alpha2EndpointSpec(
-        predictor=V1alpha2PredictorSpec(
-            min_replicas=1,
-            parallelism=1,
-            pytorch=V1alpha2PyTorchSpec(
-                storage_uri='gs://kfserving-samples/models/pytorch/cifar10',
-                model_class_name="Net",
-                resources=V1ResourceRequirements(
-                    requests={'cpu': '100m', 'memory': '2Gi'},
-                    limits={'cpu': '100m', 'memory': '2Gi'}))))
+    predictor = V1beta1PredictorSpec(
+        min_replicas=1,
+        pytorch=V1beta1TorchServeSpec(
+            storage_uri='gs://kfserving-samples/models/pytorch/cifar10',
+            model_class_name="Net",
+            resources=V1ResourceRequirements(
+                requests={'cpu': '100m', 'memory': '2Gi'},
+                limits={'cpu': '100m', 'memory': '2Gi'}
+            )
+        )
+    )
 
-    isvc = V1alpha2InferenceService(api_version=api_version,
-                                    kind=constants.KFSERVING_KIND,
-                                    metadata=client.V1ObjectMeta(
-                                        name=service_name, namespace=KFSERVING_TEST_NAMESPACE),
-                                    spec=V1alpha2InferenceServiceSpec(default=default_endpoint_spec))
+    isvc = V1beta1InferenceService(api_version=constants.KFSERVING_V1BETA1,
+                                   kind=constants.KFSERVING_KIND,
+                                   metadata=client.V1ObjectMeta(
+                                       name=service_name, namespace=KFSERVING_TEST_NAMESPACE),
+                                   spec=V1beta1InferenceServiceSpec(predictor=predictor))
 
     KFServing.create(isvc)
     try:
diff --git a/test/e2e/predictor/test_sklearn.py b/test/e2e/predictor/test_sklearn.py
--- a/test/e2e/predictor/test_sklearn.py
+++ b/test/e2e/predictor/test_sklearn.py
@@ -17,11 +17,6 @@
 from kfserving import (
     constants,
     KFServingClient,
-    V1alpha2EndpointSpec,
-    V1alpha2PredictorSpec,
-    V1alpha2SKLearnSpec,
-    V1alpha2InferenceServiceSpec,
-    V1alpha2InferenceService,
     V1beta1InferenceService,
     V1beta1InferenceServiceSpec,
     V1beta1PredictorSpec,
@@ -32,35 +27,29 @@
 from ..common.utils import predict
 from ..common.utils import KFSERVING_TEST_NAMESPACE
 
-api_version = f"{constants.KFSERVING_GROUP}/{constants.KFSERVING_VERSION}"
-api_v1beta1_version = (
-    f"{constants.KFSERVING_GROUP}/{constants.KFSERVING_V1BETA1_VERSION}"
-)
 KFServing = KFServingClient(config_file=os.environ.get("KUBECONFIG", "~/.kube/config"))
 
 
 def test_sklearn_kfserving():
     service_name = "isvc-sklearn"
-    default_endpoint_spec = V1alpha2EndpointSpec(
-        predictor=V1alpha2PredictorSpec(
-            min_replicas=1,
-            sklearn=V1alpha2SKLearnSpec(
-                storage_uri="gs://kfserving-samples/models/sklearn/iris",
-                resources=V1ResourceRequirements(
-                    requests={"cpu": "100m", "memory": "256Mi"},
-                    limits={"cpu": "100m", "memory": "256Mi"},
-                ),
+    predictor = V1beta1PredictorSpec(
+        min_replicas=1,
+        sklearn=V1beta1SKLearnSpec(
+            storage_uri="gs://kfserving-samples/models/sklearn/iris",
+            resources=V1ResourceRequirements(
+                requests={"cpu": "100m", "memory": "256Mi"},
+                limits={"cpu": "100m", "memory": "256Mi"},
             ),
-        )
+        ),
     )
 
-    isvc = V1alpha2InferenceService(
-        api_version=api_version,
+    isvc = V1beta1InferenceService(
+        api_version=constants.KFSERVING_V1BETA1,
         kind=constants.KFSERVING_KIND,
         metadata=client.V1ObjectMeta(
             name=service_name, namespace=KFSERVING_TEST_NAMESPACE
         ),
-        spec=V1alpha2InferenceServiceSpec(default=default_endpoint_spec),
+        spec=V1beta1InferenceServiceSpec(predictor=predictor),
     )
 
     KFServing.create(isvc)
@@ -85,7 +74,7 @@ def test_sklearn_v2_kfserving():
     )
 
     isvc = V1beta1InferenceService(
-        api_version=api_v1beta1_version,
+        api_version=constants.KFSERVING_V1BETA1,
         kind=constants.KFSERVING_KIND,
         metadata=client.V1ObjectMeta(
             name=service_name, namespace=KFSERVING_TEST_NAMESPACE
diff --git a/test/e2e/predictor/test_tensorflow.py b/test/e2e/predictor/test_tensorflow.py
--- a/test/e2e/predictor/test_tensorflow.py
+++ b/test/e2e/predictor/test_tensorflow.py
@@ -17,36 +17,36 @@
 from kubernetes import client
 from kfserving import KFServingClient
 from kfserving import constants
-from kfserving import V1alpha2EndpointSpec
-from kfserving import V1alpha2PredictorSpec
-from kfserving import V1alpha2TensorflowSpec
-from kfserving import V1alpha2InferenceServiceSpec
-from kfserving import V1alpha2InferenceService
+from kfserving import V1beta1PredictorSpec
+from kfserving import V1beta1TFServingSpec
+from kfserving import V1beta1InferenceServiceSpec
+from kfserving import V1beta1InferenceService
 from kubernetes.client import V1ResourceRequirements
 
 from ..common.utils import predict
 from ..common.utils import KFSERVING_TEST_NAMESPACE
 
-api_version = constants.KFSERVING_GROUP + '/' + constants.KFSERVING_VERSION
 KFServing = KFServingClient(config_file=os.environ.get("KUBECONFIG", "~/.kube/config"))
 
 
 def test_tensorflow_kfserving():
     service_name = 'isvc-tensorflow'
-    default_endpoint_spec = V1alpha2EndpointSpec(
-        predictor=V1alpha2PredictorSpec(
-            min_replicas=1,
-            tensorflow=V1alpha2TensorflowSpec(
-                storage_uri='gs://kfserving-samples/models/tensorflow/flowers',
-                resources=V1ResourceRequirements(
-                    requests={'cpu': '1', 'memory': '2Gi'},
-                    limits={'cpu': '1', 'memory': '2Gi'}))))
-
-    isvc = V1alpha2InferenceService(api_version=api_version,
-                                    kind=constants.KFSERVING_KIND,
-                                    metadata=client.V1ObjectMeta(
-                                        name=service_name, namespace=KFSERVING_TEST_NAMESPACE),
-                                    spec=V1alpha2InferenceServiceSpec(default=default_endpoint_spec))
+    predictor = V1beta1PredictorSpec(
+        min_replicas=1,
+        tensorflow=V1beta1TFServingSpec(
+            storage_uri='gs://kfserving-samples/models/tensorflow/flowers',
+            resources=V1ResourceRequirements(
+                requests={'cpu': '1', 'memory': '2Gi'},
+                limits={'cpu': '1', 'memory': '2Gi'}
+            )
+        )
+    )
+
+    isvc = V1beta1InferenceService(api_version=constants.KFSERVING_V1BETA1,
+                                   kind=constants.KFSERVING_KIND,
+                                   metadata=client.V1ObjectMeta(
+                                       name=service_name, namespace=KFSERVING_TEST_NAMESPACE),
+                                   spec=V1beta1InferenceServiceSpec(predictor=predictor))
 
     KFServing.create(isvc)
     KFServing.wait_isvc_ready(service_name, namespace=KFSERVING_TEST_NAMESPACE)
diff --git a/test/e2e/predictor/test_torchserve.py b/test/e2e/predictor/test_torchserve.py
--- a/test/e2e/predictor/test_torchserve.py
+++ b/test/e2e/predictor/test_torchserve.py
@@ -27,10 +27,6 @@
 from ..common.utils import predict
 from ..common.utils import KFSERVING_TEST_NAMESPACE
 
-api_version = f"{constants.KFSERVING_GROUP}/{constants.KFSERVING_VERSION}"
-api_v1beta1_version = (
-    f"{constants.KFSERVING_GROUP}/{constants.KFSERVING_V1BETA1_VERSION}"
-)
 KFServing = KFServingClient(config_file=os.environ.get("KUBECONFIG", "~/.kube/config"))
 
 
@@ -49,7 +45,7 @@ def test_torchserve_kfserving():
     )
 
     isvc = V1beta1InferenceService(
-        api_version=api_v1beta1_version,
+        api_version=constants.KFSERVING_V1BETA1,
         kind=constants.KFSERVING_KIND,
         metadata=client.V1ObjectMeta(
             name=service_name, namespace=KFSERVING_TEST_NAMESPACE
diff --git a/test/e2e/predictor/test_triton.py b/test/e2e/predictor/test_triton.py
--- a/test/e2e/predictor/test_triton.py
+++ b/test/e2e/predictor/test_triton.py
@@ -17,30 +17,29 @@
 
 from kfserving import KFServingClient
 from kfserving import constants
-from kfserving import V1alpha2EndpointSpec
-from kfserving import V1alpha2PredictorSpec
-from kfserving import V1alpha2TritonSpec
-from kfserving import V1alpha2InferenceServiceSpec
-from kfserving import V1alpha2InferenceService
+from kfserving import V1beta1PredictorSpec
+from kfserving import V1beta1TritonSpec
+from kfserving import V1beta1InferenceServiceSpec
+from kfserving import V1beta1InferenceService
 from ..common.utils import KFSERVING_TEST_NAMESPACE
 
-api_version = constants.KFSERVING_GROUP + '/' + constants.KFSERVING_VERSION
 KFServing = KFServingClient(config_file=os.environ.get("KUBECONFIG", "~/.kube/config"))
 
 
 def test_triton():
     service_name = 'isvc-triton'
-    default_endpoint_spec = V1alpha2EndpointSpec(
-        predictor=V1alpha2PredictorSpec(
-            min_replicas=1,
-            triton=V1alpha2TritonSpec(
-                storage_uri='gs://kfserving-samples/models/tensorrt')))
+    predictor = V1beta1PredictorSpec(
+        min_replicas=1,
+        triton=V1beta1TritonSpec(
+            storage_uri='gs://kfserving-samples/models/tensorrt'
+        )
+    )
 
-    isvc = V1alpha2InferenceService(api_version=api_version,
-                                    kind=constants.KFSERVING_KIND,
-                                    metadata=client.V1ObjectMeta(
-                                        name=service_name, namespace=KFSERVING_TEST_NAMESPACE),
-                                    spec=V1alpha2InferenceServiceSpec(default=default_endpoint_spec))
+    isvc = V1beta1InferenceService(api_version=constants.KFSERVING_V1BETA1,
+                                   kind=constants.KFSERVING_KIND,
+                                   metadata=client.V1ObjectMeta(
+                                       name=service_name, namespace=KFSERVING_TEST_NAMESPACE),
+                                   spec=V1beta1InferenceServiceSpec(predictor=predictor))
 
     KFServing.create(isvc)
     try:
diff --git a/test/e2e/predictor/test_xgboost.py b/test/e2e/predictor/test_xgboost.py
--- a/test/e2e/predictor/test_xgboost.py
+++ b/test/e2e/predictor/test_xgboost.py
@@ -17,11 +17,6 @@
 from kfserving import (
     KFServingClient,
     constants,
-    V1alpha2EndpointSpec,
-    V1alpha2PredictorSpec,
-    V1alpha2XGBoostSpec,
-    V1alpha2InferenceServiceSpec,
-    V1alpha2InferenceService,
     V1beta1InferenceService,
     V1beta1InferenceServiceSpec,
     V1beta1PredictorSpec,
@@ -31,35 +26,29 @@
 
 from ..common.utils import predict, KFSERVING_TEST_NAMESPACE
 
-api_version = f"{constants.KFSERVING_GROUP}/{constants.KFSERVING_VERSION}"
-api_v1beta1_version = (
-    f"{constants.KFSERVING_GROUP}/{constants.KFSERVING_V1BETA1_VERSION}"
-)
 KFServing = KFServingClient(config_file=os.environ.get("KUBECONFIG", "~/.kube/config"))
 
 
 def test_xgboost_kfserving():
     service_name = "isvc-xgboost"
-    default_endpoint_spec = V1alpha2EndpointSpec(
-        predictor=V1alpha2PredictorSpec(
-            min_replicas=1,
-            xgboost=V1alpha2XGBoostSpec(
-                storage_uri="gs://kfserving-samples/models/xgboost/iris",
-                resources=V1ResourceRequirements(
-                    requests={"cpu": "100m", "memory": "256Mi"},
-                    limits={"cpu": "100m", "memory": "256Mi"},
-                ),
+    predictor = V1beta1PredictorSpec(
+        min_replicas=1,
+        xgboost=V1beta1XGBoostSpec(
+            storage_uri="gs://kfserving-samples/models/xgboost/iris",
+            resources=V1ResourceRequirements(
+                requests={"cpu": "100m", "memory": "256Mi"},
+                limits={"cpu": "100m", "memory": "256Mi"},
             ),
-        )
+        ),
     )
 
-    isvc = V1alpha2InferenceService(
-        api_version=api_version,
+    isvc = V1beta1InferenceService(
+        api_version=constants.KFSERVING_V1BETA1,
         kind=constants.KFSERVING_KIND,
         metadata=client.V1ObjectMeta(
             name=service_name, namespace=KFSERVING_TEST_NAMESPACE
         ),
-        spec=V1alpha2InferenceServiceSpec(default=default_endpoint_spec),
+        spec=V1beta1InferenceServiceSpec(predictor=predictor),
     )
 
     KFServing.create(isvc)
@@ -84,7 +73,7 @@ def test_xgboost_v2_kfserving():
     )
 
     isvc = V1beta1InferenceService(
-        api_version=api_v1beta1_version,
+        api_version=constants.KFSERVING_V1BETA1,
         kind=constants.KFSERVING_KIND,
         metadata=client.V1ObjectMeta(
             name=service_name, namespace=KFSERVING_TEST_NAMESPACE
diff --git a/test/e2e/transformer/test_transformer.py b/test/e2e/transformer/test_transformer.py
--- a/test/e2e/transformer/test_transformer.py
+++ b/test/e2e/transformer/test_transformer.py
@@ -18,48 +18,47 @@
 
 from kfserving import KFServingClient
 from kfserving import constants
-from kfserving import V1alpha2EndpointSpec
-from kfserving import V1alpha2PredictorSpec
-from kfserving import V1alpha2TransformerSpec
-from kfserving import V1alpha2PyTorchSpec
-from kfserving import V1alpha2CustomSpec
-from kfserving import V1alpha2InferenceServiceSpec
-from kfserving import V1alpha2InferenceService
+from kfserving import V1beta1PredictorSpec
+from kfserving import V1beta1TransformerSpec
+from kfserving import V1beta1TorchServeSpec
+from kfserving import V1beta1InferenceServiceSpec
+from kfserving import V1beta1InferenceService
 from kubernetes.client import V1ResourceRequirements
 from kubernetes.client import V1Container
 from ..common.utils import predict
 from ..common.utils import KFSERVING_TEST_NAMESPACE
 
-api_version = constants.KFSERVING_GROUP + '/' + constants.KFSERVING_VERSION
 KFServing = KFServingClient(config_file=os.environ.get("KUBECONFIG", "~/.kube/config"))
 
 
 def test_transformer():
     service_name = 'isvc-transformer'
-    default_endpoint_spec = V1alpha2EndpointSpec(
-        predictor=V1alpha2PredictorSpec(
-            min_replicas=1,
-            pytorch=V1alpha2PyTorchSpec(
-                storage_uri='gs://kfserving-samples/models/pytorch/cifar10',
-                model_class_name="Net",
-                resources=V1ResourceRequirements(
-                    requests={'cpu': '100m', 'memory': '256Mi'},
-                    limits={'cpu': '100m', 'memory': '256Mi'}))),
-        transformer=V1alpha2TransformerSpec(
-            min_replicas=1,
-            custom=V1alpha2CustomSpec(
-                container=V1Container(
-                  image='809251082950.dkr.ecr.us-west-2.amazonaws.com/kfserving/image-transformer:latest',
-                  name='kfserving-container',
-                  resources=V1ResourceRequirements(
-                    requests={'cpu': '100m', 'memory': '256Mi'},
-                    limits={'cpu': '100m', 'memory': '256Mi'})))))
+    predictor = V1beta1PredictorSpec(
+        min_replicas=1,
+        pytorch=V1beta1TorchServeSpec(
+            storage_uri='gs://kfserving-samples/models/pytorch/cifar10',
+            model_class_name="Net",
+            resources=V1ResourceRequirements(
+                requests={'cpu': '100m', 'memory': '256Mi'},
+                limits={'cpu': '100m', 'memory': '256Mi'}
+            )
+        ),
+    )
+    transformer = V1beta1TransformerSpec(
+        min_replicas=1,
+        containers=[V1Container(
+                      image='809251082950.dkr.ecr.us-west-2.amazonaws.com/kfserving/image-transformer:latest',
+                      name='kfserving-container',
+                      resources=V1ResourceRequirements(
+                          requests={'cpu': '100m', 'memory': '256Mi'},
+                          limits={'cpu': '100m', 'memory': '256Mi'}))]
+    )
 
-    isvc = V1alpha2InferenceService(api_version=api_version,
-                                    kind=constants.KFSERVING_KIND,
-                                    metadata=client.V1ObjectMeta(
-                                        name=service_name, namespace=KFSERVING_TEST_NAMESPACE),
-                                    spec=V1alpha2InferenceServiceSpec(default=default_endpoint_spec))
+    isvc = V1beta1InferenceService(api_version=constants.KFSERVING_V1BETA1,
+                                   kind=constants.KFSERVING_KIND,
+                                   metadata=client.V1ObjectMeta(
+                                       name=service_name, namespace=KFSERVING_TEST_NAMESPACE),
+                                   spec=V1beta1InferenceServiceSpec(predictor=predictor, transformer=transformer))
 
     KFServing.create(isvc)
     try:
diff --git a/test/scripts/build-agent.sh b/test/scripts/build-agent.sh
deleted file mode 100755
--- a/test/scripts/build-agent.sh
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/bash
-# Copyright 2020 The Kubeflow Authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# This shell script is used to build an image from our argo workflow
-
-set -o errexit
-set -o nounset
-set -o pipefail
-
-export PATH=${GOPATH}/bin:/usr/local/go/bin:${PATH}
-REGISTRY="${GCP_REGISTRY}"
-PROJECT="${GCP_PROJECT}"
-GO_DIR=${GOPATH}/src/github.com/${REPO_OWNER}/${REPO_NAME}-agent
-VERSION=$(git describe --tags --always --dirty)
-
-echo "Activating service-account"
-gcloud auth activate-service-account --key-file=${GOOGLE_APPLICATION_CREDENTIALS}
-
-echo "Copy source to GOPATH"
-mkdir -p ${GO_DIR}
-cp -r cmd ${GO_DIR}/cmd
-cp -r pkg ${GO_DIR}/pkg
-cp go.mod ${GO_DIR}/go.mod
-cp go.sum ${GO_DIR}/go.sum
-cp -r third_party ${GO_DIR}/third_party
-cp agent.Dockerfile ${GO_DIR}/Dockerfile
-
-cd ${GO_DIR}
-gcloud builds submit . --tag=${REGISTRY}/${REPO_NAME}/agent:${VERSION} --project=${PROJECT}
-gcloud container images add-tag --quiet ${REGISTRY}/${REPO_NAME}/agent:${VERSION} ${REGISTRY}/${REPO_NAME}/agent:latest --verbosity=info
diff --git a/test/scripts/build-batcher.sh b/test/scripts/build-batcher.sh
deleted file mode 100755
--- a/test/scripts/build-batcher.sh
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/bash
-# Copyright 2020 The Kubeflow Authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# This shell script is used to build an image from our argo workflow
-
-set -o errexit
-set -o nounset
-set -o pipefail
-
-export PATH=${GOPATH}/bin:/usr/local/go/bin:${PATH}
-REGISTRY="${GCP_REGISTRY}"
-PROJECT="${GCP_PROJECT}"
-GO_DIR=${GOPATH}/src/github.com/${REPO_OWNER}/${REPO_NAME}-batcher
-VERSION=$(git describe --tags --always --dirty)
-
-echo "Activating service-account"
-gcloud auth activate-service-account --key-file=${GOOGLE_APPLICATION_CREDENTIALS}
-
-echo "Copy source to GOPATH"
-mkdir -p ${GO_DIR}
-cp -r cmd ${GO_DIR}/cmd
-cp -r pkg ${GO_DIR}/pkg
-cp go.mod ${GO_DIR}/go.mod
-cp go.sum ${GO_DIR}/go.sum
-cp -r third_party ${GO_DIR}/third_party
-cp batcher.Dockerfile ${GO_DIR}/Dockerfile
-
-cd ${GO_DIR}
-gcloud builds submit . --tag=${REGISTRY}/${REPO_NAME}/batcher:${VERSION} --project=${PROJECT}
-gcloud container images add-tag --quiet ${REGISTRY}/${REPO_NAME}/batcher:${VERSION} ${REGISTRY}/${REPO_NAME}/batcher:latest --verbosity=info
diff --git a/test/scripts/build-custom-bert-transformer.sh b/test/scripts/build-custom-bert-transformer.sh
deleted file mode 100755
--- a/test/scripts/build-custom-bert-transformer.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/bash
-
-# Copyright 2019 The Kubeflow Authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# This shell script is used to build an image from our argo workflow
-
-set -o errexit
-set -o nounset
-set -o pipefail
-
-export PATH=${GOPATH}/bin:/usr/local/go/bin:${PATH}
-REGISTRY="${GCP_REGISTRY}"
-PROJECT="${GCP_PROJECT}"
-BERT_TRANSFOMER_DIR="docs/samples/triton/bert/bert_tokenizer"
-VERSION=$(git describe --tags --always --dirty)
-
-echo "Activating service-account ..."
-gcloud auth activate-service-account --key-file=${GOOGLE_APPLICATION_CREDENTIALS}
-
-echo "Building and pushing bert-transfomer ..."
-cd ${BERT_TRANSFOMER_DIR}
-gcloud builds submit . --tag=${REGISTRY}/${REPO_NAME}/bert-transformer:${VERSION} --project=${PROJECT}
-gcloud container images add-tag --quiet ${REGISTRY}/${REPO_NAME}/bert-transformer:${VERSION} ${REGISTRY}/${REPO_NAME}/bert-transformer:latest --verbosity=info
diff --git a/test/scripts/build-custom-image-transformer.sh b/test/scripts/build-custom-image-transformer.sh
deleted file mode 100755
--- a/test/scripts/build-custom-image-transformer.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/bash
-
-# Copyright 2019 The Kubeflow Authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# This shell script is used to build an image from our argo workflow
-
-set -o errexit
-set -o nounset
-set -o pipefail
-
-export PATH=${GOPATH}/bin:/usr/local/go/bin:${PATH}
-REGISTRY="${GCP_REGISTRY}"
-PROJECT="${GCP_PROJECT}"
-IMAGE_TRANSFOMER_DIR="docs/samples/transformer/image_transformer/"
-VERSION=$(git describe --tags --always --dirty)
-
-echo "Activating service-account ..."
-gcloud auth activate-service-account --key-file=${GOOGLE_APPLICATION_CREDENTIALS}
-
-echo "Building and pushing image-transfomer ..."
-cd ${IMAGE_TRANSFOMER_DIR}
-cp transformer.Dockerfile Dockerfile
-gcloud builds submit . --tag=${REGISTRY}/${REPO_NAME}/image-transformer:${VERSION} --project=${PROJECT}
-gcloud container images add-tag --quiet ${REGISTRY}/${REPO_NAME}/image-transformer:${VERSION} ${REGISTRY}/${REPO_NAME}/image-transformer:latest --verbosity=info
diff --git a/test/scripts/build-kfserving.sh b/test/scripts/build-kfserving.sh
deleted file mode 100755
--- a/test/scripts/build-kfserving.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash
-
-# Copyright 2019 The Kubeflow Authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# This shell script is used to build an image from our argo workflow
-
-set -o errexit
-set -o nounset
-set -o pipefail
-
-export PATH=${GOPATH}/bin:/usr/local/go/bin:${PATH}
-REGISTRY="${GCP_REGISTRY}"
-PROJECT="${GCP_PROJECT}"
-GO_DIR=${GOPATH}/src/github.com/${REPO_OWNER}/${REPO_NAME}-server
-VERSION=$(git describe --tags --always --dirty)
-
-echo "Activating service-account"
-gcloud auth activate-service-account --key-file=${GOOGLE_APPLICATION_CREDENTIALS}
-
-echo "Copy source to GOPATH"
-mkdir -p ${GO_DIR}
-cp -r cmd ${GO_DIR}/cmd
-cp -r pkg ${GO_DIR}/pkg
-cp go.mod ${GO_DIR}/go.mod
-cp go.sum ${GO_DIR}/go.sum
-cp -r third_party ${GO_DIR}/third_party
-cp Dockerfile ${GO_DIR}
-
-cd ${GO_DIR}
-gcloud builds submit . --tag=${REGISTRY}/${REPO_NAME}/kfserving-controller:${VERSION} --project=${PROJECT}
-gcloud container images add-tag --quiet ${REGISTRY}/${REPO_NAME}/kfserving-controller:${VERSION} ${REGISTRY}/${REPO_NAME}/kfserving-controller:latest --verbosity=info
diff --git a/test/scripts/build-logger.sh b/test/scripts/build-logger.sh
deleted file mode 100755
--- a/test/scripts/build-logger.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash
-
-# Copyright 2019 The Kubeflow Authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# This shell script is used to build an image from our argo workflow
-
-set -o errexit
-set -o nounset
-set -o pipefail
-
-export PATH=${GOPATH}/bin:/usr/local/go/bin:${PATH}
-REGISTRY="${GCP_REGISTRY}"
-PROJECT="${GCP_PROJECT}"
-GO_DIR=${GOPATH}/src/github.com/${REPO_OWNER}/${REPO_NAME}-logger
-VERSION=$(git describe --tags --always --dirty)
-
-echo "Activating service-account"
-gcloud auth activate-service-account --key-file=${GOOGLE_APPLICATION_CREDENTIALS}
-
-echo "Copy source to GOPATH"
-mkdir -p ${GO_DIR}
-cp -r cmd ${GO_DIR}/cmd
-cp -r pkg ${GO_DIR}/pkg
-cp go.mod ${GO_DIR}/go.mod
-cp go.sum ${GO_DIR}/go.sum
-cp -r third_party ${GO_DIR}/third_party
-cp logger.Dockerfile ${GO_DIR}/Dockerfile
-
-cd ${GO_DIR}
-gcloud builds submit . --tag=${REGISTRY}/${REPO_NAME}/logger:${VERSION} --project=${PROJECT}
-gcloud container images add-tag --quiet ${REGISTRY}/${REPO_NAME}/logger:${VERSION} ${REGISTRY}/${REPO_NAME}/logger:latest --verbosity=info
diff --git a/test/scripts/build-python-image.sh b/test/scripts/build-python-image.sh
deleted file mode 100755
--- a/test/scripts/build-python-image.sh
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/bash
-
-# Copyright 2019 The Kubeflow Authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# This shell script is used to build an image from our argo workflow
-
-set -o errexit
-set -o nounset
-set -o pipefail
-
-if [ ! $# -eq 3 ]; then
-  echo "build-python-image.sh dockerFile imageName imageTag"
-  exit 1
-fi
-
-# Avoid conflicts due to multipe components parallel executing in same folder.
-mkdir -p build_for_$2_$3
-cp -rf python/* build_for_$2_$3
-cd build_for_$2_$3
-
-if [ ! -f $1 ]; then
-  echo "dockerFile $1 doesn't exist"
-  exit 1
-fi
-
-REGISTRY="${GCP_REGISTRY}"
-PROJECT="${GCP_PROJECT}"
-VERSION=$(git describe --tags --always --dirty)
-
-echo "Activating service-account"
-gcloud auth activate-service-account --key-file=${GOOGLE_APPLICATION_CREDENTIALS}
-
-cp $1 Dockerfile
-gcloud builds submit . --tag=${REGISTRY}/${REPO_NAME}/$2:${VERSION} --project=${PROJECT} --timeout=20m
-gcloud container images add-tag --quiet ${REGISTRY}/${REPO_NAME}/$2:${VERSION} ${REGISTRY}/${REPO_NAME}/$2:$3 --verbosity=info