{
   "components": {
     "comp-endpoint-create": {
       "executorLabel": "exec-endpoint-create",
       "inputDefinitions": {
         "parameters": {
           "description": {
             "defaultValue": "",
             "isOptional": true,
             "parameterType": "STRING"
           },
           "display_name": {
             "parameterType": "STRING"
           },
           "encryption_spec_key_name": {
             "defaultValue": "",
             "isOptional": true,
             "parameterType": "STRING"
           },
           "labels": {
             "defaultValue": {},
             "isOptional": true,
             "parameterType": "STRUCT"
           },
           "location": {
             "defaultValue": "us-central1",
             "isOptional": true,
             "parameterType": "STRING"
           },
           "network": {
             "defaultValue": "",
             "isOptional": true,
             "parameterType": "STRING"
           },
           "project": {
             "parameterType": "STRING"
           }
         }
       },
       "outputDefinitions": {
         "artifacts": {
           "endpoint": {
             "artifactType": {
               "schemaTitle": "google.VertexEndpoint",
               "schemaVersion": "0.0.1"
             }
           }
         },
         "parameters": {
           "gcp_resources": {
             "parameterType": "STRING"
           }
         }
       }
     },
     "comp-model-deploy": {
       "executorLabel": "exec-model-deploy",
       "inputDefinitions": {
         "artifacts": {
           "endpoint": {
             "artifactType": {
               "schemaTitle": "google.VertexEndpoint",
               "schemaVersion": "0.0.1"
             },
             "isOptional": true
           },
           "model": {
             "artifactType": {
               "schemaTitle": "google.VertexModel",
               "schemaVersion": "0.0.1"
             }
           }
         },
         "parameters": {
           "automatic_resources_max_replica_count": {
             "defaultValue": 0.0,
             "isOptional": true,
             "parameterType": "NUMBER_INTEGER"
           },
           "automatic_resources_min_replica_count": {
             "defaultValue": 0.0,
             "isOptional": true,
             "parameterType": "NUMBER_INTEGER"
           },
           "dedicated_resources_accelerator_count": {
             "defaultValue": 0.0,
             "isOptional": true,
             "parameterType": "NUMBER_INTEGER"
           },
           "dedicated_resources_accelerator_type": {
             "defaultValue": "",
             "isOptional": true,
             "parameterType": "STRING"
           },
           "dedicated_resources_machine_type": {
             "defaultValue": "",
             "isOptional": true,
             "parameterType": "STRING"
           },
           "dedicated_resources_max_replica_count": {
             "defaultValue": 0.0,
             "isOptional": true,
             "parameterType": "NUMBER_INTEGER"
           },
           "dedicated_resources_min_replica_count": {
             "defaultValue": 0.0,
             "isOptional": true,
             "parameterType": "NUMBER_INTEGER"
           },
           "deployed_model_display_name": {
             "defaultValue": "",
             "isOptional": true,
             "parameterType": "STRING"
           },
           "disable_container_logging": {
             "defaultValue": false,
             "isOptional": true,
             "parameterType": "BOOLEAN"
           },
           "enable_access_logging": {
             "defaultValue": false,
             "isOptional": true,
             "parameterType": "BOOLEAN"
           },
           "explanation_metadata": {
             "defaultValue": {},
             "isOptional": true,
             "parameterType": "STRUCT"
           },
           "explanation_parameters": {
             "defaultValue": {},
             "isOptional": true,
             "parameterType": "STRUCT"
           },
           "service_account": {
             "defaultValue": "",
             "isOptional": true,
             "parameterType": "STRING"
           },
           "traffic_split": {
             "defaultValue": {},
             "isOptional": true,
             "parameterType": "STRUCT"
           }
         }
       },
       "outputDefinitions": {
         "parameters": {
           "gcp_resources": {
             "parameterType": "STRING"
           }
         }
       }
     },
     "comp-model-undeploy": {
       "executorLabel": "exec-model-undeploy",
       "inputDefinitions": {
         "artifacts": {
           "endpoint": {
             "artifactType": {
               "schemaTitle": "google.VertexEndpoint",
               "schemaVersion": "0.0.1"
             }
           },
           "model": {
             "artifactType": {
               "schemaTitle": "google.VertexModel",
               "schemaVersion": "0.0.1"
             }
           }
         },
         "parameters": {
           "traffic_split": {
             "defaultValue": {},
             "isOptional": true,
             "parameterType": "STRUCT"
           }
         }
       },
       "outputDefinitions": {
         "parameters": {
           "gcp_resources": {
             "parameterType": "STRING"
           }
         }
       }
     },
     "comp-model-upload": {
       "executorLabel": "exec-model-upload",
       "inputDefinitions": {
         "artifacts": {
           "unmanaged_container_model": {
             "artifactType": {
               "schemaTitle": "google.UnmanagedContainerModel",
               "schemaVersion": "0.0.1"
             },
             "isOptional": true
           }
         },
         "parameters": {
           "artifact_uri": {
             "defaultValue": "",
             "isOptional": true,
             "parameterType": "STRING"
           },
           "description": {
             "defaultValue": "",
             "isOptional": true,
             "parameterType": "STRING"
           },
           "display_name": {
             "parameterType": "STRING"
           },
           "encryption_spec_key_name": {
             "defaultValue": "",
             "isOptional": true,
             "parameterType": "STRING"
           },
           "explanation_metadata": {
             "defaultValue": {},
             "isOptional": true,
             "parameterType": "STRUCT"
           },
           "explanation_parameters": {
             "defaultValue": {},
             "isOptional": true,
             "parameterType": "STRUCT"
           },
           "instance_schema_uri": {
             "defaultValue": "",
             "isOptional": true,
             "parameterType": "STRING"
           },
           "labels": {
             "defaultValue": {},
             "isOptional": true,
             "parameterType": "STRUCT"
           },
           "location": {
             "defaultValue": "us-central1",
             "isOptional": true,
             "parameterType": "STRING"
           },
           "parameters_schema_uri": {
             "defaultValue": "",
             "isOptional": true,
             "parameterType": "STRING"
           },
           "prediction_schema_uri": {
             "defaultValue": "",
             "isOptional": true,
             "parameterType": "STRING"
           },
           "project": {
             "parameterType": "STRING"
           },
           "serving_container_args": {
             "defaultValue": [],
             "isOptional": true,
             "parameterType": "LIST"
           },
           "serving_container_command": {
             "defaultValue": [],
             "isOptional": true,
             "parameterType": "LIST"
           },
           "serving_container_environment_variables": {
             "defaultValue": [],
             "isOptional": true,
             "parameterType": "LIST"
           },
           "serving_container_health_route": {
             "defaultValue": "",
             "isOptional": true,
             "parameterType": "STRING"
           },
           "serving_container_image_uri": {
             "defaultValue": "",
             "isOptional": true,
             "parameterType": "STRING"
           },
           "serving_container_ports": {
             "defaultValue": [],
             "isOptional": true,
             "parameterType": "LIST"
           },
           "serving_container_predict_route": {
             "defaultValue": "",
             "isOptional": true,
             "parameterType": "STRING"
           }
         }
       },
       "outputDefinitions": {
         "artifacts": {
           "model": {
             "artifactType": {
               "schemaTitle": "google.VertexModel",
               "schemaVersion": "0.0.1"
             }
           }
         },
         "parameters": {
           "gcp_resources": {
             "parameterType": "STRING"
           }
         }
       }
     }
   },
   "deploymentSpec": {
     "executors": {
       "exec-endpoint-create": {
         "container": {
           "args": [
             "--type",
             "CreateEndpoint",
             "--payload",
             "{\"Concat\": [\"{\", \"\\\"display_name\\\": \\\"\", \"{{$.inputs.parameters['display_name']}}\", \"\\\"\", \", \\\"description\\\": \\\"\", \"{{$.inputs.parameters['description']}}\", \"\\\"\", \", \\\"labels\\\": \", \"{{$.inputs.parameters['labels']}}\", \", \\\"encryption_spec\\\": {\\\"kms_key_name\\\":\\\"\", \"{{$.inputs.parameters['encryption_spec_key_name']}}\", \"\\\"}\", \", \\\"network\\\": \\\"\", \"{{$.inputs.parameters['network']}}\", \"\\\"\", \"}\"]}",
             "--project",
             "{{$.inputs.parameters['project']}}",
             "--location",
             "{{$.inputs.parameters['location']}}",
             "--gcp_resources",
             "{{$.outputs.parameters['gcp_resources'].output_file}}",
             "--executor_input",
             "{{$}}"
           ],
           "command": [
             "python3",
             "-u",
             "-m",
             "google_cloud_pipeline_components.container.v1.endpoint.create_endpoint.launcher"
           ],
           "image": "gcr.io/ml-pipeline/google-cloud-pipeline-components:2.0.0b1"
         }
       },
       "exec-model-deploy": {
         "container": {
           "args": [
             "--type",
             "DeployModel",
             "--payload",
             "{\"Concat\": [\"{\", \"\\\"endpoint\\\": \\\"\", \"{{$.inputs.artifacts['endpoint'].metadata['resourceName']}}\", \"\\\"\", \", \\\"traffic_split\\\": \", \"{{$.inputs.parameters['traffic_split']}}\", \", \\\"deployed_model\\\": {\", \"\\\"model\\\": \\\"\", \"{{$.inputs.artifacts['model'].metadata['resourceName']}}\", \"\\\"\", \", \\\"dedicated_resources\\\": {\", \"\\\"machine_spec\\\": {\", \"\\\"machine_type\\\": \\\"\", \"{{$.inputs.parameters['dedicated_resources_machine_type']}}\", \"\\\"\", \", \\\"accelerator_type\\\": \\\"\", \"{{$.inputs.parameters['dedicated_resources_accelerator_type']}}\", \"\\\"\", \", \\\"accelerator_count\\\": \", \"{{$.inputs.parameters['dedicated_resources_accelerator_count']}}\", \"}\", \", \\\"min_replica_count\\\": \", \"{{$.inputs.parameters['dedicated_resources_min_replica_count']}}\", \", \\\"max_replica_count\\\": \", \"{{$.inputs.parameters['dedicated_resources_max_replica_count']}}\", \"}\", \", \\\"automatic_resources\\\": {\", \"\\\"min_replica_count\\\": \", \"{{$.inputs.parameters['automatic_resources_min_replica_count']}}\", \", \\\"max_replica_count\\\": \", \"{{$.inputs.parameters['automatic_resources_max_replica_count']}}\", \"}\", \", \\\"service_account\\\": \\\"\", \"{{$.inputs.parameters['service_account']}}\", \"\\\"\", \", \\\"disable_container_logging\\\": \", \"{{$.inputs.parameters['disable_container_logging']}}\", \", \\\"enable_access_logging\\\": \", \"{{$.inputs.parameters['enable_access_logging']}}\", \", \\\"explanation_spec\\\": {\", \"\\\"parameters\\\": \", \"{{$.inputs.parameters['explanation_parameters']}}\", \", \\\"metadata\\\": \", \"{{$.inputs.parameters['explanation_metadata']}}\", \"}\", \"}\", \"}\"]}",
             "--project",
             "",
             "--location",
             "",
             "--gcp_resources",
             "{{$.outputs.parameters['gcp_resources'].output_file}}"
           ],
           "command": [
             "python3",
             "-u",
             "-m",
             "google_cloud_pipeline_components.container.v1.endpoint.deploy_model.launcher"
           ],
           "image": "gcr.io/ml-pipeline/google-cloud-pipeline-components:2.0.0b1"
         }
       },
       "exec-model-undeploy": {
         "container": {
           "args": [
             "--type",
             "UndeployModel",
             "--payload",
             "{\"Concat\": [\"{\", \"\\\"endpoint\\\": \\\"\", \"{{$.inputs.artifacts['endpoint'].metadata['resourceName']}}\", \"\\\"\", \", \\\"model\\\": \\\"\", \"{{$.inputs.artifacts['model'].metadata['resourceName']}}\", \"\\\"\", \", \\\"traffic_split\\\": \", \"{{$.inputs.parameters['traffic_split']}}\", \"}\"]}",
             "--project",
             "",
             "--location",
             "",
             "--gcp_resources",
             "{{$.outputs.parameters['gcp_resources'].output_file}}"
           ],
           "command": [
             "python3",
             "-u",
             "-m",
             "google_cloud_pipeline_components.container.v1.endpoint.undeploy_model.launcher"
           ],
           "image": "gcr.io/ml-pipeline/google-cloud-pipeline-components:2.0.0b1"
         }
       },
       "exec-model-upload": {
         "container": {
           "args": [
             "--type",
             "UploadModel",
             "--payload",
             "{\"Concat\": [\"{\", \"\\\"display_name\\\": \\\"\", \"{{$.inputs.parameters['display_name']}}\", \"\\\"\", \", \\\"description\\\": \\\"\", \"{{$.inputs.parameters['description']}}\", \"\\\"\", \", \\\"predict_schemata\\\": {\", \"\\\"instance_schema_uri\\\": \\\"\", \"{{$.inputs.parameters['instance_schema_uri']}}\", \"\\\"\", \", \\\"parameters_schema_uri\\\": \\\"\", \"{{$.inputs.parameters['parameters_schema_uri']}}\", \"\\\"\", \", \\\"prediction_schema_uri\\\": \\\"\", \"{{$.inputs.parameters['prediction_schema_uri']}}\", \"\\\"\", \"}\", \", \\\"container_spec\\\": {\", \"\\\"image_uri\\\": \\\"\", \"{{$.inputs.parameters['serving_container_image_uri']}}\", \"\\\"\", \", \\\"command\\\": \", \"{{$.inputs.parameters['serving_container_command']}}\", \", \\\"args\\\": \", \"{{$.inputs.parameters['serving_container_args']}}\", \", \\\"env\\\": \", \"{{$.inputs.parameters['serving_container_environment_variables']}}\", \", \\\"ports\\\": \", \"{{$.inputs.parameters['serving_container_ports']}}\", \", \\\"predict_route\\\": \\\"\", \"{{$.inputs.parameters['serving_container_predict_route']}}\", \"\\\"\", \", \\\"health_route\\\": \\\"\", \"{{$.inputs.parameters['serving_container_health_route']}}\", \"\\\"\", \"}\", \", \\\"artifact_uri\\\": \\\"\", \"{{$.inputs.parameters['artifact_uri']}}\", \"\\\"\", \", \\\"explanation_spec\\\": {\", \"\\\"parameters\\\": \", \"{{$.inputs.parameters['explanation_parameters']}}\", \", \\\"metadata\\\": \", \"{{$.inputs.parameters['explanation_metadata']}}\", \"}\", \", \\\"encryption_spec\\\": {\\\"kms_key_name\\\":\\\"\", \"{{$.inputs.parameters['encryption_spec_key_name']}}\", \"\\\"}\", \", \\\"labels\\\": \", \"{{$.inputs.parameters['labels']}}\", \"}\"]}",
             "--project",
             "{{$.inputs.parameters['project']}}",
             "--location",
             "{{$.inputs.parameters['location']}}",
             "--gcp_resources",
             "{{$.outputs.parameters['gcp_resources'].output_file}}",
             "--executor_input",
             "{{$}}"
           ],
           "command": [
             "python3",
             "-u",
             "-m",
             "google_cloud_pipeline_components.container.v1.model.upload_model.launcher"
           ],
           "image": "gcr.io/ml-pipeline/google-cloud-pipeline-components:2.0.0b1"
         }
       }
     }
   },
   "pipelineInfo": {
     "name": "training-test"
   },
   "root": {
     "dag": {
       "tasks": {
         "endpoint-create": {
           "cachingOptions": {
             "enableCache": true
           },
           "componentRef": {
             "name": "comp-endpoint-create"
           },
           "inputs": {
             "parameters": {
               "display_name": {
                 "runtimeValue": {
                   "constant": "test_display_name"
                 }
               },
               "location": {
                 "runtimeValue": {
                   "constant": "us-central1"
                 }
               },
               "project": {
                 "runtimeValue": {
                   "constant": "test_project"
                 }
               }
             }
           },
           "taskInfo": {
             "name": "endpoint-create"
           }
         },
         "model-deploy": {
           "cachingOptions": {
             "enableCache": true
           },
           "componentRef": {
             "name": "comp-model-deploy"
           },
           "dependentTasks": [
             "endpoint-create",
             "model-upload"
           ],
           "inputs": {
             "artifacts": {
               "endpoint": {
                 "taskOutputArtifact": {
                   "outputArtifactKey": "endpoint",
                   "producerTask": "endpoint-create"
                 }
               },
               "model": {
                 "taskOutputArtifact": {
                   "outputArtifactKey": "model",
                   "producerTask": "model-upload"
                 }
               }
             },
             "parameters": {
               "automatic_resources_max_replica_count": {
                 "runtimeValue": {
                   "constant": 2.0
                 }
               },
               "automatic_resources_min_replica_count": {
                 "runtimeValue": {
                   "constant": 1.0
                 }
               },
               "dedicated_resources_accelerator_count": {
                 "runtimeValue": {
                   "constant": 1.0
                 }
               },
               "dedicated_resources_accelerator_type": {
                 "runtimeValue": {
                   "constant": "fake-accelerator"
                 }
               },
               "dedicated_resources_machine_type": {
                 "runtimeValue": {
                   "constant": "n1-standard-4"
                 }
               },
               "dedicated_resources_max_replica_count": {
                 "runtimeValue": {
                   "constant": 2.0
                 }
               },
               "dedicated_resources_min_replica_count": {
                 "runtimeValue": {
                   "constant": 1.0
                 }
               },
               "deployed_model_display_name": {
                 "runtimeValue": {
                   "constant": "deployed_model_display_name"
                 }
               },
               "explanation_metadata": {
                 "runtimeValue": {
                   "constant": {
                     "xai_m": "bar"
                   }
                 }
               },
               "explanation_parameters": {
                 "runtimeValue": {
                   "constant": {
                     "xai_p": "foo"
                   }
                 }
               },
               "service_account": {
                 "runtimeValue": {
                   "constant": "fake-sa"
                 }
               },
               "traffic_split": {
                 "runtimeValue": {
                   "constant": {}
                 }
               }
             }
           },
           "taskInfo": {
             "name": "model-deploy"
           }
         },
         "model-undeploy": {
           "cachingOptions": {
             "enableCache": true
           },
           "componentRef": {
             "name": "comp-model-undeploy"
           },
           "dependentTasks": [
             "endpoint-create",
             "model-deploy",
             "model-upload"
           ],
           "inputs": {
             "artifacts": {
               "endpoint": {
                 "taskOutputArtifact": {
                   "outputArtifactKey": "endpoint",
                   "producerTask": "endpoint-create"
                 }
               },
               "model": {
                 "taskOutputArtifact": {
                   "outputArtifactKey": "model",
                   "producerTask": "model-upload"
                 }
               }
             }
           },
           "taskInfo": {
             "name": "model-undeploy"
           }
         },
         "model-upload": {
           "cachingOptions": {
             "enableCache": true
           },
           "componentRef": {
             "name": "comp-model-upload"
           },
           "inputs": {
             "parameters": {
               "artifact_uri": {
                 "runtimeValue": {
                   "constant": "project/test_artifact_uri"
                 }
               },
               "display_name": {
                 "runtimeValue": {
                   "constant": "test_display_name"
                 }
               },
               "project": {
                 "runtimeValue": {
                   "constant": "test_project"
                 }
               },
               "serving_container_image_uri": {
                 "runtimeValue": {
                   "constant": "gcr.io/test_project/test_image:test_tag"
                 }
               }
             }
           },
           "taskInfo": {
             "name": "model-upload"
           }
         }
       }
     }
   }
 }