{
   "components":{
      "comp-model-export":{
         "executorLabel":"exec-model-export",
         "inputDefinitions":{
            "artifacts":{
               "model":{
                  "artifactType":{
                     "schemaTitle":"google.VertexModel",
                     "schemaVersion":"0.0.1"
                  }
               }
            },
            "parameters":{
               "artifact_destination":{
                  "parameterType":"STRING"
               },
               "export_format_id":{
                  "parameterType":"STRING"
               },
               "image_destination":{
                  "parameterType":"STRING"
               }
            }
         },
         "outputDefinitions":{
            "parameters":{
               "gcp_resources":{
                  "parameterType":"STRING"
               },
               "output_info":{
                  "parameterType":"STRUCT"
               }
            }
         }
      },
      "comp-model-upload":{
         "executorLabel":"exec-model-upload",
         "inputDefinitions":{
            "parameters":{
               "display_name":{
                  "parameterType":"STRING"
               },
               "project":{
                  "parameterType":"STRING"
               }
            }
         },
         "outputDefinitions":{
            "artifacts":{
               "model":{
                  "artifactType":{
                     "schemaTitle":"google.VertexModel",
                     "schemaVersion":"0.0.1"
                  }
               }
            },
            "parameters":{
               "gcp_resources":{
                  "parameterType":"STRING"
               }
            }
         }
      }
   },
   "deploymentSpec":{
      "executors":{
         "exec-model-export":{
            "container":{
               "args":[
                  "--type",
                  "ExportModel",
                  "--payload",
                  "{\"name\": \"{{$.inputs.artifacts['model'].metadata['resourceName']}}\", \"output_config\": {\"export_format_id\": \"{{$.inputs.parameters['export_format_id']}}\", \"artifact_destination\": {\"output_uri_prefix\": \"{{$.inputs.parameters['artifact_destination']}}\"}, \"image_destination\":  {\"output_uri\": \"{{$.inputs.parameters['image_destination']}}\"}}}",
                  "--project",
                  "",
                  "--location",
                  "",
                  "--gcp_resources",
                  "{{$.outputs.parameters['gcp_resources'].output_file}}",
                  "--output_info",
                  "{{$.outputs.parameters['output_info'].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\": \"\", \"explanation_spec\": {\"parameters\": , \"metadata\": }, \"encryption_spec\": {\"kms_key_name\":\"\"}, \"labels\": }",
                  "--project",
                  "{{$.inputs.parameters['project']}}",
                  "--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-export":{
               "cachingOptions":{
                  "enableCache":true
               },
               "componentRef":{
                  "name":"comp-model-export"
               },
               "dependentTasks":[
                  "model-upload"
               ],
               "inputs":{
                  "artifacts":{
                     "model":{
                        "taskOutputArtifact":{
                           "outputArtifactKey":"model",
                           "producerTask":"model-upload"
                        }
                     }
                  },
                  "parameters":{
                     "artifact_destination":{
                        "runtimeValue":{
                           "constant":"artifact_destination"
                        }
                     },
                     "export_format_id":{
                        "runtimeValue":{
                           "constant":"export_format"
                        }
                     },
                     "image_destination":{
                        "runtimeValue":{
                           "constant":"image_destination"
                        }
                     }
                  }
               },
               "taskInfo":{
                  "name":"model-export"
               }
            },
            "model-upload":{
               "cachingOptions":{
                  "enableCache":true
               },
               "componentRef":{
                  "name":"comp-model-upload"
               },
               "inputs":{
                  "parameters":{
                     "display_name":{
                        "runtimeValue":{
                           "constant":"test_display_name"
                        }
                     },
                     "project":{
                        "runtimeValue":{
                           "constant":"test_project"
                        }
                     }
                  }
               },
               "taskInfo":{
                  "name":"model-upload"
               }
            }
         }
      }
   }
}
