{
   "components": {
     "comp-model-batch-predict": {
       "executorLabel": "exec-model-batch-predict",
       "inputDefinitions": {
         "artifacts": {
           "model": {
             "artifactType": {
               "schemaTitle": "google.VertexModel",
               "schemaVersion": "0.0.1"
             },
             "isOptional": true
           },
           "unmanaged_container_model": {
             "artifactType": {
               "schemaTitle": "google.UnmanagedContainerModel",
               "schemaVersion": "0.0.1"
             },
             "isOptional": true
           }
         },
         "parameters": {
           "accelerator_count": {
             "defaultValue": 0.0,
             "isOptional": true,
             "parameterType": "NUMBER_INTEGER"
           },
           "accelerator_type": {
             "defaultValue": "",
             "isOptional": true,
             "parameterType": "STRING"
           },
           "bigquery_destination_output_uri": {
             "defaultValue": "",
             "isOptional": true,
             "parameterType": "STRING"
           },
           "bigquery_source_input_uri": {
             "defaultValue": "",
             "isOptional": true,
             "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"
           },
           "gcs_destination_output_uri_prefix": {
             "defaultValue": "",
             "isOptional": true,
             "parameterType": "STRING"
           },
           "gcs_source_uris": {
             "defaultValue": [],
             "isOptional": true,
             "parameterType": "LIST"
           },
           "generate_explanation": {
             "defaultValue": false,
             "isOptional": true,
             "parameterType": "BOOLEAN"
           },
           "instances_format": {
             "defaultValue": "jsonl",
             "isOptional": true,
             "parameterType": "STRING"
           },
           "job_display_name": {
             "parameterType": "STRING"
           },
           "labels": {
             "defaultValue": {},
             "isOptional": true,
             "parameterType": "STRUCT"
           },
           "location": {
             "defaultValue": "us-central1",
             "isOptional": true,
             "parameterType": "STRING"
           },
           "machine_type": {
             "defaultValue": "",
             "isOptional": true,
             "parameterType": "STRING"
           },
           "manual_batch_tuning_parameters_batch_size": {
             "defaultValue": 0.0,
             "isOptional": true,
             "parameterType": "NUMBER_INTEGER"
           },
           "max_replica_count": {
             "defaultValue": 0.0,
             "isOptional": true,
             "parameterType": "NUMBER_INTEGER"
           },
           "model_parameters": {
             "defaultValue": {},
             "isOptional": true,
             "parameterType": "STRUCT"
           },
           "predictions_format": {
             "defaultValue": "jsonl",
             "isOptional": true,
             "parameterType": "STRING"
           },
           "project": {
             "parameterType": "STRING"
           },
           "starting_replica_count": {
             "defaultValue": 0.0,
             "isOptional": true,
             "parameterType": "NUMBER_INTEGER"
           }
         }
       },
       "outputDefinitions": {
         "artifacts": {
           "batchpredictionjob": {
             "artifactType": {
               "schemaTitle": "google.VertexBatchPredictionJob",
               "schemaVersion": "0.0.1"
             }
           },
           "bigquery_output_table": {
             "artifactType": {
               "schemaTitle": "google.BQTable",
               "schemaVersion": "0.0.1"
             }
           },
           "gcs_output_directory": {
             "artifactType": {
               "schemaTitle": "system.Artifact",
               "schemaVersion": "0.0.1"
             }
           }
         },
         "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-model-batch-predict": {
         "container": {
           "args": [
             "--type",
             "BatchPredictionJob",
             "--payload",
             "{\"Concat\": [\"{\", \"\\\"display_name\\\": \\\"\", \"{{$.inputs.parameters['job_display_name']}}\", \"\\\", \", {\"IfPresent\": {\"InputName\": \"model\", \"Then\": \"\\\"model\\\": \\\"\"}}, {\"IfPresent\": {\"InputName\": \"model\", \"Then\": \"{{$.inputs.artifacts['model'].metadata['resourceName']}}\"}}, {\"IfPresent\": {\"InputName\": \"model\", \"Then\": \"\\\",\"}}, \" \\\"input_config\\\": {\", \"\\\"instances_format\\\": \\\"\", \"{{$.inputs.parameters['instances_format']}}\", \"\\\"\", \", \\\"gcs_source\\\": {\", \"\\\"uris\\\":\", \"{{$.inputs.parameters['gcs_source_uris']}}\", \"}\", \", \\\"bigquery_source\\\": {\", \"\\\"input_uri\\\": \\\"\", \"{{$.inputs.parameters['bigquery_source_input_uri']}}\", \"\\\"\", \"}\", \"}\", \", \\\"model_parameters\\\": \", \"{{$.inputs.parameters['model_parameters']}}\", \", \\\"output_config\\\": {\", \"\\\"predictions_format\\\": \\\"\", \"{{$.inputs.parameters['predictions_format']}}\", \"\\\"\", \", \\\"gcs_destination\\\": {\", \"\\\"output_uri_prefix\\\": \\\"\", \"{{$.inputs.parameters['gcs_destination_output_uri_prefix']}}\", \"\\\"\", \"}\", \", \\\"bigquery_destination\\\": {\", \"\\\"output_uri\\\": \\\"\", \"{{$.inputs.parameters['bigquery_destination_output_uri']}}\", \"\\\"\", \"}\", \"}\", \", \\\"dedicated_resources\\\": {\", \"\\\"machine_spec\\\": {\", \"\\\"machine_type\\\": \\\"\", \"{{$.inputs.parameters['machine_type']}}\", \"\\\"\", \", \\\"accelerator_type\\\": \\\"\", \"{{$.inputs.parameters['accelerator_type']}}\", \"\\\"\", \", \\\"accelerator_count\\\": \", \"{{$.inputs.parameters['accelerator_count']}}\", \"}\", \", \\\"starting_replica_count\\\": \", \"{{$.inputs.parameters['starting_replica_count']}}\", \", \\\"max_replica_count\\\": \", \"{{$.inputs.parameters['max_replica_count']}}\", \"}\", \", \\\"manual_batch_tuning_parameters\\\": {\", \"\\\"batch_size\\\": \", \"{{$.inputs.parameters['manual_batch_tuning_parameters_batch_size']}}\", \"}\", \", \\\"generate_explanation\\\": \", \"{{$.inputs.parameters['generate_explanation']}}\", \", \\\"explanation_spec\\\": {\", \"\\\"parameters\\\": \", \"{{$.inputs.parameters['explanation_parameters']}}\", \", \\\"metadata\\\": \", \"{{$.inputs.parameters['explanation_metadata']}}\", \"}\", \", \\\"labels\\\": \", \"{{$.inputs.parameters['labels']}}\", \", \\\"encryption_spec\\\": {\\\"kms_key_name\\\":\\\"\", \"{{$.inputs.parameters['encryption_spec_key_name']}}\", \"\\\"}\", \"}\"]}",
             "--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.batch_prediction_job.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": {
         "model-batch-predict": {
           "cachingOptions": {
             "enableCache": true
           },
           "componentRef": {
             "name": "comp-model-batch-predict"
           },
           "dependentTasks": [
             "model-upload"
           ],
           "inputs": {
             "artifacts": {
               "model": {
                 "taskOutputArtifact": {
                   "outputArtifactKey": "model",
                   "producerTask": "model-upload"
                 }
               }
             },
             "parameters": {
               "accelerator_count": {
                 "runtimeValue": {
                   "constant": 1.0
                 }
               },
               "accelerator_type": {
                 "runtimeValue": {
                   "constant": "accelerator_type"
                 }
               },
               "bigquery_destination_output_uri": {
                 "runtimeValue": {
                   "constant": "bigquery_destination_output_uri"
                 }
               },
               "bigquery_source_input_uri": {
                 "runtimeValue": {
                   "constant": "bigquery_source_input_uri"
                 }
               },
               "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"
                   }
                 }
               },
               "gcs_destination_output_uri_prefix": {
                 "runtimeValue": {
                   "constant": "gs://test_gcs_output_dir/batch_prediction"
                 }
               },
               "gcs_source_uris": {
                 "runtimeValue": {
                   "constant": [
                     "gs://test_gcs_source"
                   ]
                 }
               },
               "generate_explanation": {
                 "runtimeValue": {
                   "constant": 1.0
                 }
               },
               "instances_format": {
                 "runtimeValue": {
                   "constant": "instance_format"
                 }
               },
               "job_display_name": {
                 "runtimeValue": {
                   "constant": "test_display_name"
                 }
               },
               "labels": {
                 "runtimeValue": {
                   "constant": {
                     "foo": "bar"
                   }
                 }
               },
               "location": {
                 "runtimeValue": {
                   "constant": "us-central1"
                 }
               },
               "machine_type": {
                 "runtimeValue": {
                   "constant": "machine_type"
                 }
               },
               "manual_batch_tuning_parameters_batch_size": {
                 "runtimeValue": {
                   "constant": 4.0
                 }
               },
               "max_replica_count": {
                 "runtimeValue": {
                   "constant": 3.0
                 }
               },
               "model_parameters": {
                 "runtimeValue": {
                   "constant": {
                     "foo": "bar"
                   }
                 }
               },
               "predictions_format": {
                 "runtimeValue": {
                   "constant": "predictions_format"
                 }
               },
               "project": {
                 "runtimeValue": {
                   "constant": "test_project"
                 }
               },
               "starting_replica_count": {
                 "runtimeValue": {
                   "constant": 2.0
                 }
               }
             }
           },
           "taskInfo": {
             "name": "model-batch-predict"
           }
         },
         "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"
           }
         }
       }
     }
   },
   "schemaVersion": "2.1.0"
 }