Class: Google::Cloud::AIPlatform::V1::NasJobSpec

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/aiplatform/v1/nas_job.rb

Overview

Represents the spec of a NasJob.

Defined Under Namespace

Classes: MultiTrialAlgorithmSpec

Instance Attribute Summary collapse

Instance Attribute Details

#multi_trial_algorithm_spec::Google::Cloud::AIPlatform::V1::NasJobSpec::MultiTrialAlgorithmSpec

Returns The spec of multi-trial algorithms.

Returns:



135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
# File 'proto_docs/google/cloud/aiplatform/v1/nas_job.rb', line 135

class NasJobSpec
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The spec of multi-trial Neural Architecture Search (NAS).
  # @!attribute [rw] multi_trial_algorithm
  #   @return [::Google::Cloud::AIPlatform::V1::NasJobSpec::MultiTrialAlgorithmSpec::MultiTrialAlgorithm]
  #     The multi-trial Neural Architecture Search (NAS) algorithm
  #     type. Defaults to `REINFORCEMENT_LEARNING`.
  # @!attribute [rw] metric
  #   @return [::Google::Cloud::AIPlatform::V1::NasJobSpec::MultiTrialAlgorithmSpec::MetricSpec]
  #     Metric specs for the NAS job.
  #     Validation for this field is done at `multi_trial_algorithm_spec` field.
  # @!attribute [rw] search_trial_spec
  #   @return [::Google::Cloud::AIPlatform::V1::NasJobSpec::MultiTrialAlgorithmSpec::SearchTrialSpec]
  #     Required. Spec for search trials.
  # @!attribute [rw] train_trial_spec
  #   @return [::Google::Cloud::AIPlatform::V1::NasJobSpec::MultiTrialAlgorithmSpec::TrainTrialSpec]
  #     Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count]
  #     search trials will be trained for every M
  #     [TrainTrialSpec.frequency] trials searched.
  class MultiTrialAlgorithmSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Represents a metric to optimize.
    # @!attribute [rw] metric_id
    #   @return [::String]
    #     Required. The ID of the metric. Must not contain whitespaces.
    # @!attribute [rw] goal
    #   @return [::Google::Cloud::AIPlatform::V1::NasJobSpec::MultiTrialAlgorithmSpec::MetricSpec::GoalType]
    #     Required. The optimization goal of the metric.
    class MetricSpec
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # The available types of optimization goals.
      module GoalType
        # Goal Type will default to maximize.
        GOAL_TYPE_UNSPECIFIED = 0

        # Maximize the goal metric.
        MAXIMIZE = 1

        # Minimize the goal metric.
        MINIMIZE = 2
      end
    end

    # Represent spec for search trials.
    # @!attribute [rw] search_trial_job_spec
    #   @return [::Google::Cloud::AIPlatform::V1::CustomJobSpec]
    #     Required. The spec of a search trial job. The same spec applies to
    #     all search trials.
    # @!attribute [rw] max_trial_count
    #   @return [::Integer]
    #     Required. The maximum number of Neural Architecture Search (NAS) trials
    #     to run.
    # @!attribute [rw] max_parallel_trial_count
    #   @return [::Integer]
    #     Required. The maximum number of trials to run in parallel.
    # @!attribute [rw] max_failed_trial_count
    #   @return [::Integer]
    #     The number of failed trials that need to be seen before failing
    #     the NasJob.
    #
    #     If set to 0, Vertex AI decides how many trials must fail
    #     before the whole job fails.
    class SearchTrialSpec
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Represent spec for train trials.
    # @!attribute [rw] train_trial_job_spec
    #   @return [::Google::Cloud::AIPlatform::V1::CustomJobSpec]
    #     Required. The spec of a train trial job. The same spec applies to
    #     all train trials.
    # @!attribute [rw] max_parallel_trial_count
    #   @return [::Integer]
    #     Required. The maximum number of trials to run in parallel.
    # @!attribute [rw] frequency
    #   @return [::Integer]
    #     Required. Frequency of search trials to start train stage. Top N
    #     [TrainTrialSpec.max_parallel_trial_count]
    #     search trials will be trained for every M
    #     [TrainTrialSpec.frequency] trials searched.
    class TrainTrialSpec
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # The available types of multi-trial algorithms.
    module MultiTrialAlgorithm
      # Defaults to `REINFORCEMENT_LEARNING`.
      MULTI_TRIAL_ALGORITHM_UNSPECIFIED = 0

      # The Reinforcement Learning Algorithm for Multi-trial Neural
      # Architecture Search (NAS).
      REINFORCEMENT_LEARNING = 1

      # The Grid Search Algorithm for Multi-trial Neural
      # Architecture Search (NAS).
      GRID_SEARCH = 2
    end
  end
end

#resume_nas_job_id::String

Returns The ID of the existing NasJob in the same Project and Location which will be used to resume search. search_space_spec and nas_algorithm_spec are obtained from previous NasJob hence should not provide them again for this NasJob.

Returns:

  • (::String)

    The ID of the existing NasJob in the same Project and Location which will be used to resume search. search_space_spec and nas_algorithm_spec are obtained from previous NasJob hence should not provide them again for this NasJob.



135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
# File 'proto_docs/google/cloud/aiplatform/v1/nas_job.rb', line 135

class NasJobSpec
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The spec of multi-trial Neural Architecture Search (NAS).
  # @!attribute [rw] multi_trial_algorithm
  #   @return [::Google::Cloud::AIPlatform::V1::NasJobSpec::MultiTrialAlgorithmSpec::MultiTrialAlgorithm]
  #     The multi-trial Neural Architecture Search (NAS) algorithm
  #     type. Defaults to `REINFORCEMENT_LEARNING`.
  # @!attribute [rw] metric
  #   @return [::Google::Cloud::AIPlatform::V1::NasJobSpec::MultiTrialAlgorithmSpec::MetricSpec]
  #     Metric specs for the NAS job.
  #     Validation for this field is done at `multi_trial_algorithm_spec` field.
  # @!attribute [rw] search_trial_spec
  #   @return [::Google::Cloud::AIPlatform::V1::NasJobSpec::MultiTrialAlgorithmSpec::SearchTrialSpec]
  #     Required. Spec for search trials.
  # @!attribute [rw] train_trial_spec
  #   @return [::Google::Cloud::AIPlatform::V1::NasJobSpec::MultiTrialAlgorithmSpec::TrainTrialSpec]
  #     Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count]
  #     search trials will be trained for every M
  #     [TrainTrialSpec.frequency] trials searched.
  class MultiTrialAlgorithmSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Represents a metric to optimize.
    # @!attribute [rw] metric_id
    #   @return [::String]
    #     Required. The ID of the metric. Must not contain whitespaces.
    # @!attribute [rw] goal
    #   @return [::Google::Cloud::AIPlatform::V1::NasJobSpec::MultiTrialAlgorithmSpec::MetricSpec::GoalType]
    #     Required. The optimization goal of the metric.
    class MetricSpec
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # The available types of optimization goals.
      module GoalType
        # Goal Type will default to maximize.
        GOAL_TYPE_UNSPECIFIED = 0

        # Maximize the goal metric.
        MAXIMIZE = 1

        # Minimize the goal metric.
        MINIMIZE = 2
      end
    end

    # Represent spec for search trials.
    # @!attribute [rw] search_trial_job_spec
    #   @return [::Google::Cloud::AIPlatform::V1::CustomJobSpec]
    #     Required. The spec of a search trial job. The same spec applies to
    #     all search trials.
    # @!attribute [rw] max_trial_count
    #   @return [::Integer]
    #     Required. The maximum number of Neural Architecture Search (NAS) trials
    #     to run.
    # @!attribute [rw] max_parallel_trial_count
    #   @return [::Integer]
    #     Required. The maximum number of trials to run in parallel.
    # @!attribute [rw] max_failed_trial_count
    #   @return [::Integer]
    #     The number of failed trials that need to be seen before failing
    #     the NasJob.
    #
    #     If set to 0, Vertex AI decides how many trials must fail
    #     before the whole job fails.
    class SearchTrialSpec
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Represent spec for train trials.
    # @!attribute [rw] train_trial_job_spec
    #   @return [::Google::Cloud::AIPlatform::V1::CustomJobSpec]
    #     Required. The spec of a train trial job. The same spec applies to
    #     all train trials.
    # @!attribute [rw] max_parallel_trial_count
    #   @return [::Integer]
    #     Required. The maximum number of trials to run in parallel.
    # @!attribute [rw] frequency
    #   @return [::Integer]
    #     Required. Frequency of search trials to start train stage. Top N
    #     [TrainTrialSpec.max_parallel_trial_count]
    #     search trials will be trained for every M
    #     [TrainTrialSpec.frequency] trials searched.
    class TrainTrialSpec
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # The available types of multi-trial algorithms.
    module MultiTrialAlgorithm
      # Defaults to `REINFORCEMENT_LEARNING`.
      MULTI_TRIAL_ALGORITHM_UNSPECIFIED = 0

      # The Reinforcement Learning Algorithm for Multi-trial Neural
      # Architecture Search (NAS).
      REINFORCEMENT_LEARNING = 1

      # The Grid Search Algorithm for Multi-trial Neural
      # Architecture Search (NAS).
      GRID_SEARCH = 2
    end
  end
end

#search_space_spec::String

Returns It defines the search space for Neural Architecture Search (NAS).

Returns:

  • (::String)

    It defines the search space for Neural Architecture Search (NAS).



135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
# File 'proto_docs/google/cloud/aiplatform/v1/nas_job.rb', line 135

class NasJobSpec
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The spec of multi-trial Neural Architecture Search (NAS).
  # @!attribute [rw] multi_trial_algorithm
  #   @return [::Google::Cloud::AIPlatform::V1::NasJobSpec::MultiTrialAlgorithmSpec::MultiTrialAlgorithm]
  #     The multi-trial Neural Architecture Search (NAS) algorithm
  #     type. Defaults to `REINFORCEMENT_LEARNING`.
  # @!attribute [rw] metric
  #   @return [::Google::Cloud::AIPlatform::V1::NasJobSpec::MultiTrialAlgorithmSpec::MetricSpec]
  #     Metric specs for the NAS job.
  #     Validation for this field is done at `multi_trial_algorithm_spec` field.
  # @!attribute [rw] search_trial_spec
  #   @return [::Google::Cloud::AIPlatform::V1::NasJobSpec::MultiTrialAlgorithmSpec::SearchTrialSpec]
  #     Required. Spec for search trials.
  # @!attribute [rw] train_trial_spec
  #   @return [::Google::Cloud::AIPlatform::V1::NasJobSpec::MultiTrialAlgorithmSpec::TrainTrialSpec]
  #     Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count]
  #     search trials will be trained for every M
  #     [TrainTrialSpec.frequency] trials searched.
  class MultiTrialAlgorithmSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Represents a metric to optimize.
    # @!attribute [rw] metric_id
    #   @return [::String]
    #     Required. The ID of the metric. Must not contain whitespaces.
    # @!attribute [rw] goal
    #   @return [::Google::Cloud::AIPlatform::V1::NasJobSpec::MultiTrialAlgorithmSpec::MetricSpec::GoalType]
    #     Required. The optimization goal of the metric.
    class MetricSpec
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # The available types of optimization goals.
      module GoalType
        # Goal Type will default to maximize.
        GOAL_TYPE_UNSPECIFIED = 0

        # Maximize the goal metric.
        MAXIMIZE = 1

        # Minimize the goal metric.
        MINIMIZE = 2
      end
    end

    # Represent spec for search trials.
    # @!attribute [rw] search_trial_job_spec
    #   @return [::Google::Cloud::AIPlatform::V1::CustomJobSpec]
    #     Required. The spec of a search trial job. The same spec applies to
    #     all search trials.
    # @!attribute [rw] max_trial_count
    #   @return [::Integer]
    #     Required. The maximum number of Neural Architecture Search (NAS) trials
    #     to run.
    # @!attribute [rw] max_parallel_trial_count
    #   @return [::Integer]
    #     Required. The maximum number of trials to run in parallel.
    # @!attribute [rw] max_failed_trial_count
    #   @return [::Integer]
    #     The number of failed trials that need to be seen before failing
    #     the NasJob.
    #
    #     If set to 0, Vertex AI decides how many trials must fail
    #     before the whole job fails.
    class SearchTrialSpec
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Represent spec for train trials.
    # @!attribute [rw] train_trial_job_spec
    #   @return [::Google::Cloud::AIPlatform::V1::CustomJobSpec]
    #     Required. The spec of a train trial job. The same spec applies to
    #     all train trials.
    # @!attribute [rw] max_parallel_trial_count
    #   @return [::Integer]
    #     Required. The maximum number of trials to run in parallel.
    # @!attribute [rw] frequency
    #   @return [::Integer]
    #     Required. Frequency of search trials to start train stage. Top N
    #     [TrainTrialSpec.max_parallel_trial_count]
    #     search trials will be trained for every M
    #     [TrainTrialSpec.frequency] trials searched.
    class TrainTrialSpec
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # The available types of multi-trial algorithms.
    module MultiTrialAlgorithm
      # Defaults to `REINFORCEMENT_LEARNING`.
      MULTI_TRIAL_ALGORITHM_UNSPECIFIED = 0

      # The Reinforcement Learning Algorithm for Multi-trial Neural
      # Architecture Search (NAS).
      REINFORCEMENT_LEARNING = 1

      # The Grid Search Algorithm for Multi-trial Neural
      # Architecture Search (NAS).
      GRID_SEARCH = 2
    end
  end
end