{
   "components":{
      "comp-model-delete":{
         "executorLabel":"exec-model-delete",
         "inputDefinitions":{
            "artifacts":{
               "model":{
                  "artifactType":{
                     "schemaTitle":"google.VertexModel",
                     "schemaVersion":"0.0.1"
                  }
               }
            }
         },
         "outputDefinitions":{
            "parameters":{
               "gcp_resources":{
                  "parameterType":"STRING"
               }
            }
         }
      },
      "comp-model-upload":{
         "executorLabel":"exec-model-upload",
         "inputDefinitions":{
            "parameters":{
               "artifact_uri":{
                  "parameterType":"STRING"
               },
               "description":{
                  "parameterType":"STRING"
               },
               "display_name":{
                  "parameterType":"STRING"
               },
               "encryption_spec_key_name":{
                  "parameterType":"STRING"
               },
               "explanation_metadata":{
                  "parameterType":"STRUCT"
               },
               "explanation_parameters":{
                  "parameterType":"STRUCT"
               },
               "instance_schema_uri":{
                  "parameterType":"STRING"
               },
               "labels":{
                  "parameterType":"STRUCT"
               },
               "location":{
                  "parameterType":"STRING"
               },
               "parameters_schema_uri":{
                  "parameterType":"STRING"
               },
               "prediction_schema_uri":{
                  "parameterType":"STRING"
               },
               "project":{
                  "parameterType":"STRING"
               },
               "serving_container_args":{
                  "parameterType":"LIST"
               },
               "serving_container_command":{
                  "parameterType":"LIST"
               },
               "serving_container_environment_variables":{
                  "parameterType":"LIST"
               },
               "serving_container_health_route":{
                  "parameterType":"STRING"
               },
               "serving_container_image_uri":{
                  "parameterType":"STRING"
               },
               "serving_container_ports":{
                  "parameterType":"LIST"
               },
               "serving_container_predict_route":{
                  "parameterType":"STRING"
               }
            }
         },
         "outputDefinitions":{
            "artifacts":{
               "model":{
                  "artifactType":{
                     "schemaTitle":"google.VertexModel",
                     "schemaVersion":"0.0.1"
                  }
               }
            },
            "parameters":{
               "gcp_resources":{
                  "parameterType":"STRING"
               }
            }
         }
      }
   },
   "deploymentSpec":{
      "executors":{
         "exec-model-delete":{
            "container":{
               "args":[
                  "--type",
                  "DeleteModel",
                  "--payload",
                  "{\"model\": \"{{$.inputs.artifacts['model'].metadata['resourceName']}}\"}",
                  "--project",
                  "",
                  "--location",
                  "",
                  "--gcp_resources",
                  "{{$.outputs.parameters['gcp_resources'].output_file}}"
               ],
               "command":[
                  "python3",
                  "-u",
                  "-m",
                  "google_cloud_pipeline_components.container.v1.gcp_launcher.launcher"
               ],
               "image":"gcr.io/ml-pipeline/google-cloud-pipeline-components:1.10.13"
            }
         },
         "exec-model-upload":{
            "container":{
               "args":[
                  "--type",
                  "UploadModel",
                  "--payload",
                  "{\"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.gcp_launcher.launcher"
               ],
               "image":"gcr.io/ml-pipeline/google-cloud-pipeline-components:1.10.13"
            }
         }
      }
   },
   "pipelineInfo":{
      "name":"training-test"
   },
   "root":{
      "dag":{
         "tasks":{
            "model-delete":{
               "cachingOptions":{
                  "enableCache":true
               },
               "componentRef":{
                  "name":"comp-model-delete"
               },
               "dependentTasks":[
                  "model-upload"
               ],
               "inputs":{
                  "artifacts":{
                     "model":{
                        "taskOutputArtifact":{
                           "outputArtifactKey":"model",
                           "producerTask":"model-upload"
                        }
                     }
                  }
               },
               "taskInfo":{
                  "name":"model-delete"
               }
            },
            "model-upload":{
               "cachingOptions":{
                  "enableCache":true
               },
               "componentRef":{
                  "name":"comp-model-upload"
               },
               "inputs":{
                  "parameters":{
                     "artifact_uri":{
                        "runtimeValue":{
                           "constant":"some artifact_uri"
                        }
                     },
                     "description":{
                        "runtimeValue":{
                           "constant":"some description"
                        }
                     },
                     "display_name":{
                        "runtimeValue":{
                           "constant":"test_display_name"
                        }
                     },
                     "encryption_spec_key_name":{
                        "runtimeValue":{
                           "constant":"some encryption_spec_key_name"
                        }
                     },
                     "explanation_metadata":{
                        "runtimeValue":{
                           "constant":{
                              "xai_m":"bar"
                           }
                        }
                     },
                     "explanation_parameters":{
                        "runtimeValue":{
                           "constant":{
                              "xai_p":"foo"
                           }
                        }
                     },
                     "instance_schema_uri":{
                        "runtimeValue":{
                           "constant":"some instance_schema_uri"
                        }
                     },
                     "labels":{
                        "runtimeValue":{
                           "constant":{
                              "foo":"bar"
                           }
                        }
                     },
                     "location":{
                        "runtimeValue":{
                           "constant":"us-central1"
                        }
                     },
                     "parameters_schema_uri":{
                        "runtimeValue":{
                           "constant":"some parameters_schema_uri"
                        }
                     },
                     "prediction_schema_uri":{
                        "runtimeValue":{
                           "constant":"some prediction_schema_uri"
                        }
                     },
                     "project":{
                        "runtimeValue":{
                           "constant":"test_project"
                        }
                     },
                     "serving_container_args":{
                        "runtimeValue":{
                           "constant":[
                              "arg1",
                              "arg2"
                           ]
                        }
                     },
                     "serving_container_command":{
                        "runtimeValue":{
                           "constant":[
                              "command1",
                              "command2"
                           ]
                        }
                     },
                     "serving_container_environment_variables":{
                        "runtimeValue":{
                           "constant":[
                              "env1",
                              "env2"
                           ]
                        }
                     },
                     "serving_container_health_route":{
                        "runtimeValue":{
                           "constant":"some serving_container_health_route"
                        }
                     },
                     "serving_container_image_uri":{
                        "runtimeValue":{
                           "constant":"gcr.io/test_project/test_image:test_tag"
                        }
                     },
                     "serving_container_ports":{
                        "runtimeValue":{
                           "constant":[
                              "123",
                              "456"
                           ]
                        }
                     },
                     "serving_container_predict_route":{
                        "runtimeValue":{
                           "constant":"some serving_container_predict_route"
                        }
                     }
                  }
               },
               "taskInfo":{
                  "name":"model-upload"
               }
            }
         }
      }
   }
}
