Class: Google::Apis::MlV1::GoogleCloudMlV1HyperparameterSpec
- Inherits:
-
Object
- Object
- Google::Apis::MlV1::GoogleCloudMlV1HyperparameterSpec
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/ml_v1/classes.rb,
lib/google/apis/ml_v1/representations.rb,
lib/google/apis/ml_v1/representations.rb
Overview
Represents a set of hyperparameters to optimize.
Instance Attribute Summary collapse
-
#algorithm ⇒ String
Optional.
-
#enable_trial_early_stopping ⇒ Boolean
(also: #enable_trial_early_stopping?)
Optional.
-
#goal ⇒ String
Required.
-
#hyperparameter_metric_tag ⇒ String
Optional.
-
#max_failed_trials ⇒ Fixnum
Optional.
-
#max_parallel_trials ⇒ Fixnum
Optional.
-
#max_trials ⇒ Fixnum
Optional.
-
#params ⇒ Array<Google::Apis::MlV1::GoogleCloudMlV1ParameterSpec>
Required.
-
#resume_previous_job_id ⇒ String
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudMlV1HyperparameterSpec
constructor
A new instance of GoogleCloudMlV1HyperparameterSpec.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudMlV1HyperparameterSpec
Returns a new instance of GoogleCloudMlV1HyperparameterSpec.
1298 1299 1300 |
# File 'lib/google/apis/ml_v1/classes.rb', line 1298 def initialize(**args) update!(**args) end |
Instance Attribute Details
#algorithm ⇒ String
Optional. The search algorithm specified for the hyperparameter tuning job.
Uses the default AI Platform hyperparameter tuning algorithm if unspecified.
Corresponds to the JSON property algorithm
1237 1238 1239 |
# File 'lib/google/apis/ml_v1/classes.rb', line 1237 def algorithm @algorithm end |
#enable_trial_early_stopping ⇒ Boolean Also known as: enable_trial_early_stopping?
Optional. Indicates if the hyperparameter tuning job enables auto trial early
stopping.
Corresponds to the JSON property enableTrialEarlyStopping
1243 1244 1245 |
# File 'lib/google/apis/ml_v1/classes.rb', line 1243 def enable_trial_early_stopping @enable_trial_early_stopping end |
#goal ⇒ String
Required. The type of goal to use for tuning. Available types are MAXIMIZE
and MINIMIZE. Defaults to MAXIMIZE.
Corresponds to the JSON property goal
1250 1251 1252 |
# File 'lib/google/apis/ml_v1/classes.rb', line 1250 def goal @goal end |
#hyperparameter_metric_tag ⇒ String
Optional. The TensorFlow summary tag name to use for optimizing trials. For
current versions of TensorFlow, this tag name should exactly match what is
shown in TensorBoard, including all scopes. For versions of TensorFlow prior
to 0.12, this should be only the tag passed to tf.Summary. By default, "
training/hptuning/metric" will be used.
Corresponds to the JSON property hyperparameterMetricTag
1259 1260 1261 |
# File 'lib/google/apis/ml_v1/classes.rb', line 1259 def hyperparameter_metric_tag @hyperparameter_metric_tag end |
#max_failed_trials ⇒ Fixnum
Optional. The number of failed trials that need to be seen before failing the
hyperparameter tuning job. You can specify this field to override the default
failing criteria for AI Platform hyperparameter tuning jobs. Defaults to zero,
which means the service decides when a hyperparameter job should fail.
Corresponds to the JSON property maxFailedTrials
1267 1268 1269 |
# File 'lib/google/apis/ml_v1/classes.rb', line 1267 def max_failed_trials @max_failed_trials end |
#max_parallel_trials ⇒ Fixnum
Optional. The number of training trials to run concurrently. You can reduce
the time it takes to perform hyperparameter tuning by adding trials in
parallel. However, each trail only benefits from the information gained in
completed trials. That means that a trial does not get access to the results
of trials running at the same time, which could reduce the quality of the
overall optimization. Each trial will use the same scale tier and machine
types. Defaults to one.
Corresponds to the JSON property maxParallelTrials
1278 1279 1280 |
# File 'lib/google/apis/ml_v1/classes.rb', line 1278 def max_parallel_trials @max_parallel_trials end |
#max_trials ⇒ Fixnum
Optional. How many training trials should be attempted to optimize the
specified hyperparameters. Defaults to one.
Corresponds to the JSON property maxTrials
1284 1285 1286 |
# File 'lib/google/apis/ml_v1/classes.rb', line 1284 def max_trials @max_trials end |
#params ⇒ Array<Google::Apis::MlV1::GoogleCloudMlV1ParameterSpec>
Required. The set of parameters to tune.
Corresponds to the JSON property params
1289 1290 1291 |
# File 'lib/google/apis/ml_v1/classes.rb', line 1289 def params @params end |
#resume_previous_job_id ⇒ String
Optional. The prior hyperparameter tuning job id that users hope to continue
with. The job id will be used to find the corresponding vizier study guid and
resume the study.
Corresponds to the JSON property resumePreviousJobId
1296 1297 1298 |
# File 'lib/google/apis/ml_v1/classes.rb', line 1296 def resume_previous_job_id @resume_previous_job_id end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 |
# File 'lib/google/apis/ml_v1/classes.rb', line 1303 def update!(**args) @algorithm = args[:algorithm] if args.key?(:algorithm) @enable_trial_early_stopping = args[:enable_trial_early_stopping] if args.key?(:enable_trial_early_stopping) @goal = args[:goal] if args.key?(:goal) @hyperparameter_metric_tag = args[:hyperparameter_metric_tag] if args.key?(:hyperparameter_metric_tag) @max_failed_trials = args[:max_failed_trials] if args.key?(:max_failed_trials) @max_parallel_trials = args[:max_parallel_trials] if args.key?(:max_parallel_trials) @max_trials = args[:max_trials] if args.key?(:max_trials) @params = args[:params] if args.key?(:params) @resume_previous_job_id = args[:resume_previous_job_id] if args.key?(:resume_previous_job_id) end |