1// Copyright 2023 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package google.cloud.aiplatform.v1beta1; 18 19import "google/api/field_behavior.proto"; 20import "google/api/resource.proto"; 21import "google/protobuf/duration.proto"; 22import "google/protobuf/struct.proto"; 23import "google/protobuf/timestamp.proto"; 24 25option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; 26option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; 27option java_multiple_files = true; 28option java_outer_classname = "StudyProto"; 29option java_package = "com.google.cloud.aiplatform.v1beta1"; 30option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; 31option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; 32 33// A message representing a Study. 34message Study { 35 option (google.api.resource) = { 36 type: "aiplatform.googleapis.com/Study" 37 pattern: "projects/{project}/locations/{location}/studies/{study}" 38 }; 39 40 // Describes the Study state. 41 enum State { 42 // The study state is unspecified. 43 STATE_UNSPECIFIED = 0; 44 45 // The study is active. 46 ACTIVE = 1; 47 48 // The study is stopped due to an internal error. 49 INACTIVE = 2; 50 51 // The study is done when the service exhausts the parameter search space 52 // or max_trial_count is reached. 53 COMPLETED = 3; 54 } 55 56 // Output only. The name of a study. The study's globally unique identifier. 57 // Format: `projects/{project}/locations/{location}/studies/{study}` 58 string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 59 60 // Required. Describes the Study, default value is empty string. 61 string display_name = 2 [(google.api.field_behavior) = REQUIRED]; 62 63 // Required. Configuration of the Study. 64 StudySpec study_spec = 3 [(google.api.field_behavior) = REQUIRED]; 65 66 // Output only. The detailed state of a Study. 67 State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; 68 69 // Output only. Time at which the study was created. 70 google.protobuf.Timestamp create_time = 5 71 [(google.api.field_behavior) = OUTPUT_ONLY]; 72 73 // Output only. A human readable reason why the Study is inactive. 74 // This should be empty if a study is ACTIVE or COMPLETED. 75 string inactive_reason = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; 76} 77 78// A message representing a Trial. A Trial contains a unique set of Parameters 79// that has been or will be evaluated, along with the objective metrics got by 80// running the Trial. 81message Trial { 82 option (google.api.resource) = { 83 type: "aiplatform.googleapis.com/Trial" 84 pattern: "projects/{project}/locations/{location}/studies/{study}/trials/{trial}" 85 }; 86 87 // A message representing a parameter to be tuned. 88 message Parameter { 89 // Output only. The ID of the parameter. The parameter should be defined in 90 // [StudySpec's 91 // Parameters][google.cloud.aiplatform.v1beta1.StudySpec.parameters]. 92 string parameter_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 93 94 // Output only. The value of the parameter. 95 // `number_value` will be set if a parameter defined in StudySpec is 96 // in type 'INTEGER', 'DOUBLE' or 'DISCRETE'. 97 // `string_value` will be set if a parameter defined in StudySpec is 98 // in type 'CATEGORICAL'. 99 google.protobuf.Value value = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 100 } 101 102 // Describes a Trial state. 103 enum State { 104 // The Trial state is unspecified. 105 STATE_UNSPECIFIED = 0; 106 107 // Indicates that a specific Trial has been requested, but it has not yet 108 // been suggested by the service. 109 REQUESTED = 1; 110 111 // Indicates that the Trial has been suggested. 112 ACTIVE = 2; 113 114 // Indicates that the Trial should stop according to the service. 115 STOPPING = 3; 116 117 // Indicates that the Trial is completed successfully. 118 SUCCEEDED = 4; 119 120 // Indicates that the Trial should not be attempted again. 121 // The service will set a Trial to INFEASIBLE when it's done but missing 122 // the final_measurement. 123 INFEASIBLE = 5; 124 } 125 126 // Output only. Resource name of the Trial assigned by the service. 127 string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 128 129 // Output only. The identifier of the Trial assigned by the service. 130 string id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 131 132 // Output only. The detailed state of the Trial. 133 State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; 134 135 // Output only. The parameters of the Trial. 136 repeated Parameter parameters = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; 137 138 // Output only. The final measurement containing the objective value. 139 Measurement final_measurement = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; 140 141 // Output only. A list of measurements that are strictly lexicographically 142 // ordered by their induced tuples (steps, elapsed_duration). 143 // These are used for early stopping computations. 144 repeated Measurement measurements = 6 145 [(google.api.field_behavior) = OUTPUT_ONLY]; 146 147 // Output only. Time when the Trial was started. 148 google.protobuf.Timestamp start_time = 7 149 [(google.api.field_behavior) = OUTPUT_ONLY]; 150 151 // Output only. Time when the Trial's status changed to `SUCCEEDED` or 152 // `INFEASIBLE`. 153 google.protobuf.Timestamp end_time = 8 154 [(google.api.field_behavior) = OUTPUT_ONLY]; 155 156 // Output only. The identifier of the client that originally requested this 157 // Trial. Each client is identified by a unique client_id. When a client asks 158 // for a suggestion, Vertex AI Vizier will assign it a Trial. The client 159 // should evaluate the Trial, complete it, and report back to Vertex AI 160 // Vizier. If suggestion is asked again by same client_id before the Trial is 161 // completed, the same Trial will be returned. Multiple clients with 162 // different client_ids can ask for suggestions simultaneously, each of them 163 // will get their own Trial. 164 string client_id = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; 165 166 // Output only. A human readable string describing why the Trial is 167 // infeasible. This is set only if Trial state is `INFEASIBLE`. 168 string infeasible_reason = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; 169 170 // Output only. The CustomJob name linked to the Trial. 171 // It's set for a HyperparameterTuningJob's Trial. 172 string custom_job = 11 [ 173 (google.api.field_behavior) = OUTPUT_ONLY, 174 (google.api.resource_reference) = { 175 type: "aiplatform.googleapis.com/CustomJob" 176 } 177 ]; 178 179 // Output only. URIs for accessing [interactive 180 // shells](https://cloud.google.com/vertex-ai/docs/training/monitor-debug-interactive-shell) 181 // (one URI for each training node). Only available if this trial is part of 182 // a 183 // [HyperparameterTuningJob][google.cloud.aiplatform.v1beta1.HyperparameterTuningJob] 184 // and the job's 185 // [trial_job_spec.enable_web_access][google.cloud.aiplatform.v1beta1.CustomJobSpec.enable_web_access] 186 // field is `true`. 187 // 188 // The keys are names of each node used for the trial; for example, 189 // `workerpool0-0` for the primary node, `workerpool1-0` for the first node in 190 // the second worker pool, and `workerpool1-1` for the second node in the 191 // second worker pool. 192 // 193 // The values are the URIs for each node's interactive shell. 194 map<string, string> web_access_uris = 12 195 [(google.api.field_behavior) = OUTPUT_ONLY]; 196} 197 198// Represents specification of a Study. 199message StudySpec { 200 // Represents a metric to optimize. 201 message MetricSpec { 202 // Used in safe optimization to specify threshold levels and risk tolerance. 203 message SafetyMetricConfig { 204 // Safety threshold (boundary value between safe and unsafe). NOTE that if 205 // you leave SafetyMetricConfig unset, a default value of 0 will be used. 206 double safety_threshold = 1; 207 208 // Desired minimum fraction of safe trials (over total number of trials) 209 // that should be targeted by the algorithm at any time during the 210 // study (best effort). This should be between 0.0 and 1.0 and a value of 211 // 0.0 means that there is no minimum and an algorithm proceeds without 212 // targeting any specific fraction. A value of 1.0 means that the 213 // algorithm attempts to only Suggest safe Trials. 214 optional double desired_min_safe_trials_fraction = 2; 215 } 216 217 // The available types of optimization goals. 218 enum GoalType { 219 // Goal Type will default to maximize. 220 GOAL_TYPE_UNSPECIFIED = 0; 221 222 // Maximize the goal metric. 223 MAXIMIZE = 1; 224 225 // Minimize the goal metric. 226 MINIMIZE = 2; 227 } 228 229 // Required. The ID of the metric. Must not contain whitespaces and must be 230 // unique amongst all MetricSpecs. 231 string metric_id = 1 [(google.api.field_behavior) = REQUIRED]; 232 233 // Required. The optimization goal of the metric. 234 GoalType goal = 2 [(google.api.field_behavior) = REQUIRED]; 235 236 // Used for safe search. In the case, the metric will be a safety 237 // metric. You must provide a separate metric for objective metric. 238 optional SafetyMetricConfig safety_config = 3; 239 } 240 241 // Represents a single parameter to optimize. 242 message ParameterSpec { 243 // Value specification for a parameter in `DOUBLE` type. 244 message DoubleValueSpec { 245 // Required. Inclusive minimum value of the parameter. 246 double min_value = 1 [(google.api.field_behavior) = REQUIRED]; 247 248 // Required. Inclusive maximum value of the parameter. 249 double max_value = 2 [(google.api.field_behavior) = REQUIRED]; 250 251 // A default value for a `DOUBLE` parameter that is assumed to be a 252 // relatively good starting point. Unset value signals that there is no 253 // offered starting point. 254 // 255 // Currently only supported by the Vertex AI Vizier service. Not supported 256 // by HyperparameterTuningJob or TrainingPipeline. 257 optional double default_value = 4; 258 } 259 260 // Value specification for a parameter in `INTEGER` type. 261 message IntegerValueSpec { 262 // Required. Inclusive minimum value of the parameter. 263 int64 min_value = 1 [(google.api.field_behavior) = REQUIRED]; 264 265 // Required. Inclusive maximum value of the parameter. 266 int64 max_value = 2 [(google.api.field_behavior) = REQUIRED]; 267 268 // A default value for an `INTEGER` parameter that is assumed to be a 269 // relatively good starting point. Unset value signals that there is no 270 // offered starting point. 271 // 272 // Currently only supported by the Vertex AI Vizier service. Not supported 273 // by HyperparameterTuningJob or TrainingPipeline. 274 optional int64 default_value = 4; 275 } 276 277 // Value specification for a parameter in `CATEGORICAL` type. 278 message CategoricalValueSpec { 279 // Required. The list of possible categories. 280 repeated string values = 1 [(google.api.field_behavior) = REQUIRED]; 281 282 // A default value for a `CATEGORICAL` parameter that is assumed to be a 283 // relatively good starting point. Unset value signals that there is no 284 // offered starting point. 285 // 286 // Currently only supported by the Vertex AI Vizier service. Not supported 287 // by HyperparameterTuningJob or TrainingPipeline. 288 optional string default_value = 3; 289 } 290 291 // Value specification for a parameter in `DISCRETE` type. 292 message DiscreteValueSpec { 293 // Required. A list of possible values. 294 // The list should be in increasing order and at least 1e-10 apart. 295 // For instance, this parameter might have possible settings of 1.5, 2.5, 296 // and 4.0. This list should not contain more than 1,000 values. 297 repeated double values = 1 [(google.api.field_behavior) = REQUIRED]; 298 299 // A default value for a `DISCRETE` parameter that is assumed to be a 300 // relatively good starting point. Unset value signals that there is no 301 // offered starting point. It automatically rounds to the 302 // nearest feasible discrete point. 303 // 304 // Currently only supported by the Vertex AI Vizier service. Not supported 305 // by HyperparameterTuningJob or TrainingPipeline. 306 optional double default_value = 3; 307 } 308 309 // Represents a parameter spec with condition from its parent parameter. 310 message ConditionalParameterSpec { 311 // Represents the spec to match discrete values from parent parameter. 312 message DiscreteValueCondition { 313 // Required. Matches values of the parent parameter of 'DISCRETE' type. 314 // All values must exist in `discrete_value_spec` of parent parameter. 315 // 316 // The Epsilon of the value matching is 1e-10. 317 repeated double values = 1 [(google.api.field_behavior) = REQUIRED]; 318 } 319 320 // Represents the spec to match integer values from parent parameter. 321 message IntValueCondition { 322 // Required. Matches values of the parent parameter of 'INTEGER' type. 323 // All values must lie in `integer_value_spec` of parent parameter. 324 repeated int64 values = 1 [(google.api.field_behavior) = REQUIRED]; 325 } 326 327 // Represents the spec to match categorical values from parent parameter. 328 message CategoricalValueCondition { 329 // Required. Matches values of the parent parameter of 'CATEGORICAL' 330 // type. All values must exist in `categorical_value_spec` of parent 331 // parameter. 332 repeated string values = 1 [(google.api.field_behavior) = REQUIRED]; 333 } 334 335 // A set of parameter values from the parent ParameterSpec's feasible 336 // space. 337 oneof parent_value_condition { 338 // The spec for matching values from a parent parameter of 339 // `DISCRETE` type. 340 DiscreteValueCondition parent_discrete_values = 2; 341 342 // The spec for matching values from a parent parameter of `INTEGER` 343 // type. 344 IntValueCondition parent_int_values = 3; 345 346 // The spec for matching values from a parent parameter of 347 // `CATEGORICAL` type. 348 CategoricalValueCondition parent_categorical_values = 4; 349 } 350 351 // Required. The spec for a conditional parameter. 352 ParameterSpec parameter_spec = 1 [(google.api.field_behavior) = REQUIRED]; 353 } 354 355 // The type of scaling that should be applied to this parameter. 356 enum ScaleType { 357 // By default, no scaling is applied. 358 SCALE_TYPE_UNSPECIFIED = 0; 359 360 // Scales the feasible space to (0, 1) linearly. 361 UNIT_LINEAR_SCALE = 1; 362 363 // Scales the feasible space logarithmically to (0, 1). The entire 364 // feasible space must be strictly positive. 365 UNIT_LOG_SCALE = 2; 366 367 // Scales the feasible space "reverse" logarithmically to (0, 1). The 368 // result is that values close to the top of the feasible space are spread 369 // out more than points near the bottom. The entire feasible space must be 370 // strictly positive. 371 UNIT_REVERSE_LOG_SCALE = 3; 372 } 373 374 oneof parameter_value_spec { 375 // The value spec for a 'DOUBLE' parameter. 376 DoubleValueSpec double_value_spec = 2; 377 378 // The value spec for an 'INTEGER' parameter. 379 IntegerValueSpec integer_value_spec = 3; 380 381 // The value spec for a 'CATEGORICAL' parameter. 382 CategoricalValueSpec categorical_value_spec = 4; 383 384 // The value spec for a 'DISCRETE' parameter. 385 DiscreteValueSpec discrete_value_spec = 5; 386 } 387 388 // Required. The ID of the parameter. Must not contain whitespaces and must 389 // be unique amongst all ParameterSpecs. 390 string parameter_id = 1 [(google.api.field_behavior) = REQUIRED]; 391 392 // How the parameter should be scaled. 393 // Leave unset for `CATEGORICAL` parameters. 394 ScaleType scale_type = 6; 395 396 // A conditional parameter node is active if the parameter's value matches 397 // the conditional node's parent_value_condition. 398 // 399 // If two items in conditional_parameter_specs have the same name, they 400 // must have disjoint parent_value_condition. 401 repeated ConditionalParameterSpec conditional_parameter_specs = 10; 402 } 403 404 // The decay curve automated stopping rule builds a Gaussian Process 405 // Regressor to predict the final objective value of a Trial based on the 406 // already completed Trials and the intermediate measurements of the current 407 // Trial. Early stopping is requested for the current Trial if there is very 408 // low probability to exceed the optimal value found so far. 409 message DecayCurveAutomatedStoppingSpec { 410 // True if 411 // [Measurement.elapsed_duration][google.cloud.aiplatform.v1beta1.Measurement.elapsed_duration] 412 // is used as the x-axis of each Trials Decay Curve. Otherwise, 413 // [Measurement.step_count][google.cloud.aiplatform.v1beta1.Measurement.step_count] 414 // will be used as the x-axis. 415 bool use_elapsed_duration = 1; 416 } 417 418 // The median automated stopping rule stops a pending Trial if the Trial's 419 // best objective_value is strictly below the median 'performance' of all 420 // completed Trials reported up to the Trial's last measurement. 421 // Currently, 'performance' refers to the running average of the objective 422 // values reported by the Trial in each measurement. 423 message MedianAutomatedStoppingSpec { 424 // True if median automated stopping rule applies on 425 // [Measurement.elapsed_duration][google.cloud.aiplatform.v1beta1.Measurement.elapsed_duration]. 426 // It means that elapsed_duration field of latest measurement of current 427 // Trial is used to compute median objective value for each completed 428 // Trials. 429 bool use_elapsed_duration = 1; 430 } 431 432 // Configuration for ConvexAutomatedStoppingSpec. 433 // When there are enough completed trials (configured by 434 // min_measurement_count), for pending trials with enough measurements and 435 // steps, the policy first computes an overestimate of the objective value at 436 // max_num_steps according to the slope of the incomplete objective value 437 // curve. No prediction can be made if the curve is completely flat. If the 438 // overestimation is worse than the best objective value of the completed 439 // trials, this pending trial will be early-stopped, but a last measurement 440 // will be added to the pending trial with max_num_steps and predicted 441 // objective value from the autoregression model. 442 message ConvexAutomatedStoppingSpec { 443 // Steps used in predicting the final objective for early stopped trials. In 444 // general, it's set to be the same as the defined steps in training / 445 // tuning. If not defined, it will learn it from the completed trials. When 446 // use_steps is false, this field is set to the maximum elapsed seconds. 447 int64 max_step_count = 1; 448 449 // Minimum number of steps for a trial to complete. Trials which do not have 450 // a measurement with step_count > min_step_count won't be considered for 451 // early stopping. It's ok to set it to 0, and a trial can be early stopped 452 // at any stage. By default, min_step_count is set to be one-tenth of the 453 // max_step_count. 454 // When use_elapsed_duration is true, this field is set to the minimum 455 // elapsed seconds. 456 int64 min_step_count = 2; 457 458 // The minimal number of measurements in a Trial. Early-stopping checks 459 // will not trigger if less than min_measurement_count+1 completed trials or 460 // pending trials with less than min_measurement_count measurements. If not 461 // defined, the default value is 5. 462 int64 min_measurement_count = 3; 463 464 // The hyper-parameter name used in the tuning job that stands for learning 465 // rate. Leave it blank if learning rate is not in a parameter in tuning. 466 // The learning_rate is used to estimate the objective value of the ongoing 467 // trial. 468 string learning_rate_parameter_name = 4; 469 470 // This bool determines whether or not the rule is applied based on 471 // elapsed_secs or steps. If use_elapsed_duration==false, the early stopping 472 // decision is made according to the predicted objective values according to 473 // the target steps. If use_elapsed_duration==true, elapsed_secs is used 474 // instead of steps. Also, in this case, the parameters max_num_steps and 475 // min_num_steps are overloaded to contain max_elapsed_seconds and 476 // min_elapsed_seconds. 477 bool use_elapsed_duration = 5; 478 479 // ConvexAutomatedStoppingSpec by default only updates the trials that needs 480 // to be early stopped using a newly trained auto-regressive model. When 481 // this flag is set to True, all stopped trials from the beginning are 482 // potentially updated in terms of their `final_measurement`. Also, note 483 // that the training logic of autoregressive models is different in this 484 // case. Enabling this option has shown better results and this may be the 485 // default option in the future. 486 optional bool update_all_stopped_trials = 6; 487 } 488 489 // Configuration for ConvexStopPolicy. 490 message ConvexStopConfig { 491 option deprecated = true; 492 493 // Steps used in predicting the final objective for early stopped trials. In 494 // general, it's set to be the same as the defined steps in training / 495 // tuning. When use_steps is false, this field is set to the maximum elapsed 496 // seconds. 497 int64 max_num_steps = 1; 498 499 // Minimum number of steps for a trial to complete. Trials which do not have 500 // a measurement with num_steps > min_num_steps won't be considered for 501 // early stopping. It's ok to set it to 0, and a trial can be early stopped 502 // at any stage. By default, min_num_steps is set to be one-tenth of the 503 // max_num_steps. 504 // When use_steps is false, this field is set to the minimum elapsed 505 // seconds. 506 int64 min_num_steps = 2; 507 508 // The number of Trial measurements used in autoregressive model for 509 // value prediction. A trial won't be considered early stopping if has fewer 510 // measurement points. 511 int64 autoregressive_order = 3; 512 513 // The hyper-parameter name used in the tuning job that stands for learning 514 // rate. Leave it blank if learning rate is not in a parameter in tuning. 515 // The learning_rate is used to estimate the objective value of the ongoing 516 // trial. 517 string learning_rate_parameter_name = 4; 518 519 // This bool determines whether or not the rule is applied based on 520 // elapsed_secs or steps. If use_seconds==false, the early stopping decision 521 // is made according to the predicted objective values according to the 522 // target steps. If use_seconds==true, elapsed_secs is used instead of 523 // steps. Also, in this case, the parameters max_num_steps and min_num_steps 524 // are overloaded to contain max_elapsed_seconds and min_elapsed_seconds. 525 bool use_seconds = 5; 526 } 527 528 // This contains flag for manually disabling transfer learning for a study. 529 // The names of prior studies being used for transfer learning (if any) 530 // are also listed here. 531 message TransferLearningConfig { 532 // Flag to to manually prevent vizier from using transfer learning on a 533 // new study. Otherwise, vizier will automatically determine whether or not 534 // to use transfer learning. 535 bool disable_transfer_learning = 1; 536 537 // Output only. Names of previously completed studies 538 repeated string prior_study_names = 2 539 [(google.api.field_behavior) = OUTPUT_ONLY]; 540 } 541 542 // The available search algorithms for the Study. 543 enum Algorithm { 544 // The default algorithm used by Vertex AI for [hyperparameter 545 // tuning](https://cloud.google.com/vertex-ai/docs/training/hyperparameter-tuning-overview) 546 // and [Vertex AI Vizier](https://cloud.google.com/vertex-ai/docs/vizier). 547 ALGORITHM_UNSPECIFIED = 0; 548 549 // Simple grid search within the feasible space. To use grid search, 550 // all parameters must be `INTEGER`, `CATEGORICAL`, or `DISCRETE`. 551 GRID_SEARCH = 2; 552 553 // Simple random search within the feasible space. 554 RANDOM_SEARCH = 3; 555 } 556 557 // Describes the noise level of the repeated observations. 558 // 559 // "Noisy" means that the repeated observations with the same Trial parameters 560 // may lead to different metric evaluations. 561 enum ObservationNoise { 562 // The default noise level chosen by Vertex AI. 563 OBSERVATION_NOISE_UNSPECIFIED = 0; 564 565 // Vertex AI assumes that the objective function is (nearly) 566 // perfectly reproducible, and will never repeat the same Trial 567 // parameters. 568 LOW = 1; 569 570 // Vertex AI will estimate the amount of noise in metric 571 // evaluations, it may repeat the same Trial parameters more than once. 572 HIGH = 2; 573 } 574 575 // This indicates which measurement to use if/when the service automatically 576 // selects the final measurement from previously reported intermediate 577 // measurements. Choose this based on two considerations: 578 // A) Do you expect your measurements to monotonically improve? 579 // If so, choose LAST_MEASUREMENT. On the other hand, if you're in a 580 // situation where your system can "over-train" and you expect the 581 // performance to get better for a while but then start declining, 582 // choose BEST_MEASUREMENT. 583 // B) Are your measurements significantly noisy and/or irreproducible? 584 // If so, BEST_MEASUREMENT will tend to be over-optimistic, and it 585 // may be better to choose LAST_MEASUREMENT. 586 // If both or neither of (A) and (B) apply, it doesn't matter which 587 // selection type is chosen. 588 enum MeasurementSelectionType { 589 // Will be treated as LAST_MEASUREMENT. 590 MEASUREMENT_SELECTION_TYPE_UNSPECIFIED = 0; 591 592 // Use the last measurement reported. 593 LAST_MEASUREMENT = 1; 594 595 // Use the best measurement reported. 596 BEST_MEASUREMENT = 2; 597 } 598 599 oneof automated_stopping_spec { 600 // The automated early stopping spec using decay curve rule. 601 DecayCurveAutomatedStoppingSpec decay_curve_stopping_spec = 4; 602 603 // The automated early stopping spec using median rule. 604 MedianAutomatedStoppingSpec median_automated_stopping_spec = 5; 605 606 // Deprecated. 607 // The automated early stopping using convex stopping rule. 608 ConvexStopConfig convex_stop_config = 8 [deprecated = true]; 609 610 // The automated early stopping spec using convex stopping rule. 611 ConvexAutomatedStoppingSpec convex_automated_stopping_spec = 9; 612 } 613 614 // Required. Metric specs for the Study. 615 repeated MetricSpec metrics = 1 [(google.api.field_behavior) = REQUIRED]; 616 617 // Required. The set of parameters to tune. 618 repeated ParameterSpec parameters = 2 619 [(google.api.field_behavior) = REQUIRED]; 620 621 // The search algorithm specified for the Study. 622 Algorithm algorithm = 3; 623 624 // The observation noise level of the study. 625 // Currently only supported by the Vertex AI Vizier service. Not supported by 626 // HyperparameterTuningJob or TrainingPipeline. 627 ObservationNoise observation_noise = 6; 628 629 // Describe which measurement selection type will be used 630 MeasurementSelectionType measurement_selection_type = 7; 631 632 // The configuration info/options for transfer learning. Currently supported 633 // for Vertex AI Vizier service, not HyperParameterTuningJob 634 TransferLearningConfig transfer_learning_config = 10; 635} 636 637// A message representing a Measurement of a Trial. A Measurement contains 638// the Metrics got by executing a Trial using suggested hyperparameter 639// values. 640message Measurement { 641 // A message representing a metric in the measurement. 642 message Metric { 643 // Output only. The ID of the Metric. The Metric should be defined in 644 // [StudySpec's Metrics][google.cloud.aiplatform.v1beta1.StudySpec.metrics]. 645 string metric_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 646 647 // Output only. The value for this metric. 648 double value = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 649 } 650 651 // Output only. Time that the Trial has been running at the point of this 652 // Measurement. 653 google.protobuf.Duration elapsed_duration = 1 654 [(google.api.field_behavior) = OUTPUT_ONLY]; 655 656 // Output only. The number of steps the machine learning model has been 657 // trained for. Must be non-negative. 658 int64 step_count = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 659 660 // Output only. A list of metrics got by evaluating the objective functions 661 // using suggested Parameter values. 662 repeated Metric metrics = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; 663} 664