{
   "components":{
      "comp-hyperparameter-tuning-job":{
         "executorLabel":"exec-hyperparameter-tuning-job",
         "inputDefinitions":{
            "parameters":{
               "base_output_directory":{
                  "parameterType":"STRING"
               },
               "display_name":{
                  "parameterType":"STRING"
               },
               "location":{
                  "parameterType":"STRING"
               },
               "max_trial_count":{
                  "parameterType":"NUMBER_INTEGER"
               },
               "parallel_trial_count":{
                  "parameterType":"NUMBER_INTEGER"
               },
               "project":{
                  "parameterType":"STRING"
               },
               "study_spec_metrics":{
                  "parameterType":"LIST"
               },
               "study_spec_parameters":{
                  "parameterType":"LIST"
               },
               "worker_pool_specs":{
                  "parameterType":"LIST"
               }
            }
         },
         "outputDefinitions":{
            "parameters":{
               "gcp_resources":{
                  "parameterType":"STRING"
               }
            }
         }
      }
   },
   "deploymentSpec":{
      "executors":{
         "exec-hyperparameter-tuning-job":{
            "container":{
               "args":[
                  "--type",
                  "HyperparameterTuningJob",
                  "--payload",
                  "{\"display_name\": \"{{$.inputs.parameters['display_name']}}\", \"study_spec\": {\"metrics\": {{$.inputs.parameters['study_spec_metrics']}}, \"parameters\": {{$.inputs.parameters['study_spec_parameters']}}, \"algorithm\": \"\", \"measurement_selection_type\": \"\"}, \"max_trial_count\": {{$.inputs.parameters['max_trial_count']}}, \"parallel_trial_count\": {{$.inputs.parameters['parallel_trial_count']}}, \"max_failed_trial_count\": , \"trial_job_spec\": {\"worker_pool_specs\": {{$.inputs.parameters['worker_pool_specs']}}, \"service_account\": \"\", \"network\": \"\", \"base_output_directory\": {\"output_uri_prefix\": \"{{$.inputs.parameters['base_output_directory']}}\"}}, \"encryption_spec\": {\"kms_key_name\":\"\"}}",
                  "--project",
                  "{{$.inputs.parameters['project']}}",
                  "--location",
                  "{{$.inputs.parameters['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"
            }
         }
      }
   },
   "pipelineInfo":{
      "name":"training-test"
   },
   "root":{
      "dag":{
         "tasks":{
            "hyperparameter-tuning-job":{
               "cachingOptions":{
                  "enableCache":true
               },
               "componentRef":{
                  "name":"comp-hyperparameter-tuning-job"
               },
               "inputs":{
                  "parameters":{
                     "base_output_directory":{
                        "runtimeValue":{
                           "constant":"gs://my-bucket/blob"
                        }
                     },
                     "display_name":{
                        "runtimeValue":{
                           "constant":"test_display_name"
                        }
                     },
                     "location":{
                        "runtimeValue":{
                           "constant":"us-central1"
                        }
                     },
                     "max_trial_count":{
                        "runtimeValue":{
                           "constant":10.0
                        }
                     },
                     "parallel_trial_count":{
                        "runtimeValue":{
                           "constant":3.0
                        }
                     },
                     "project":{
                        "runtimeValue":{
                           "constant":"test_project"
                        }
                     },
                     "study_spec_metrics":{
                        "runtimeValue":{
                           "constant":[
                              {
                                 "goal":1.0,
                                 "metric_id":"accuracy"
                              }
                           ]
                        }
                     },
                     "study_spec_parameters":{
                        "runtimeValue":{
                           "constant":[
                              {
                                 "conditional_parameter_specs":[

                                 ],
                                 "double_value_spec":{
                                    "max_value":1.0,
                                    "min_value":0.001
                                 },
                                 "parameter_id":"learning_rate",
                                 "scale_type":2.0
                              }
                           ]
                        }
                     },
                     "worker_pool_specs":{
                        "runtimeValue":{
                           "constant":[
                              {
                                 "container_spec":{
                                    "image_uri":"gcr.io/project_id/test"
                                 },
                                 "machine_spec":{
                                    "accelerator_count":1.0,
                                    "accelerator_type":"NVIDIA_TESLA_T4",
                                    "machine_type":"n1-standard-4"
                                 },
                                 "replica_count":1.0
                              }
                           ]
                        }
                     }
                  }
               },
               "taskInfo":{
                  "name":"hyperparameter-tuning-job"
               }
            }
         }
      }
   }
}
