source: vendor/google/apiclient-services/src/Aiplatform/Resource/ProjectsLocationsStudiesTrials.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 9 days ago

Upload project files

  • Property mode set to 100644
File size: 9.7 KB
Line 
1<?php
2/*
3 * Copyright 2014 Google Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy of
7 * the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17
18namespace Google\Service\Aiplatform\Resource;
19
20use Google\Service\Aiplatform\GoogleCloudAiplatformV1AddTrialMeasurementRequest;
21use Google\Service\Aiplatform\GoogleCloudAiplatformV1CheckTrialEarlyStoppingStateRequest;
22use Google\Service\Aiplatform\GoogleCloudAiplatformV1CompleteTrialRequest;
23use Google\Service\Aiplatform\GoogleCloudAiplatformV1ListOptimalTrialsRequest;
24use Google\Service\Aiplatform\GoogleCloudAiplatformV1ListOptimalTrialsResponse;
25use Google\Service\Aiplatform\GoogleCloudAiplatformV1ListTrialsResponse;
26use Google\Service\Aiplatform\GoogleCloudAiplatformV1StopTrialRequest;
27use Google\Service\Aiplatform\GoogleCloudAiplatformV1SuggestTrialsRequest;
28use Google\Service\Aiplatform\GoogleCloudAiplatformV1Trial;
29use Google\Service\Aiplatform\GoogleLongrunningOperation;
30use Google\Service\Aiplatform\GoogleProtobufEmpty;
31
32/**
33 * The "trials" collection of methods.
34 * Typical usage is:
35 * <code>
36 * $aiplatformService = new Google\Service\Aiplatform(...);
37 * $trials = $aiplatformService->projects_locations_studies_trials;
38 * </code>
39 */
40class ProjectsLocationsStudiesTrials extends \Google\Service\Resource
41{
42 /**
43 * Adds a measurement of the objective metrics to a Trial. This measurement is
44 * assumed to have been taken before the Trial is complete.
45 * (trials.addTrialMeasurement)
46 *
47 * @param string $trialName Required. The name of the trial to add measurement.
48 * Format:
49 * `projects/{project}/locations/{location}/studies/{study}/trials/{trial}`
50 * @param GoogleCloudAiplatformV1AddTrialMeasurementRequest $postBody
51 * @param array $optParams Optional parameters.
52 * @return GoogleCloudAiplatformV1Trial
53 * @throws \Google\Service\Exception
54 */
55 public function addTrialMeasurement($trialName, GoogleCloudAiplatformV1AddTrialMeasurementRequest $postBody, $optParams = [])
56 {
57 $params = ['trialName' => $trialName, 'postBody' => $postBody];
58 $params = array_merge($params, $optParams);
59 return $this->call('addTrialMeasurement', [$params], GoogleCloudAiplatformV1Trial::class);
60 }
61 /**
62 * Checks whether a Trial should stop or not. Returns a long-running operation.
63 * When the operation is successful, it will contain a
64 * CheckTrialEarlyStoppingStateResponse. (trials.checkTrialEarlyStoppingState)
65 *
66 * @param string $trialName Required. The Trial's name. Format:
67 * `projects/{project}/locations/{location}/studies/{study}/trials/{trial}`
68 * @param GoogleCloudAiplatformV1CheckTrialEarlyStoppingStateRequest $postBody
69 * @param array $optParams Optional parameters.
70 * @return GoogleLongrunningOperation
71 * @throws \Google\Service\Exception
72 */
73 public function checkTrialEarlyStoppingState($trialName, GoogleCloudAiplatformV1CheckTrialEarlyStoppingStateRequest $postBody, $optParams = [])
74 {
75 $params = ['trialName' => $trialName, 'postBody' => $postBody];
76 $params = array_merge($params, $optParams);
77 return $this->call('checkTrialEarlyStoppingState', [$params], GoogleLongrunningOperation::class);
78 }
79 /**
80 * Marks a Trial as complete. (trials.complete)
81 *
82 * @param string $name Required. The Trial's name. Format:
83 * `projects/{project}/locations/{location}/studies/{study}/trials/{trial}`
84 * @param GoogleCloudAiplatformV1CompleteTrialRequest $postBody
85 * @param array $optParams Optional parameters.
86 * @return GoogleCloudAiplatformV1Trial
87 * @throws \Google\Service\Exception
88 */
89 public function complete($name, GoogleCloudAiplatformV1CompleteTrialRequest $postBody, $optParams = [])
90 {
91 $params = ['name' => $name, 'postBody' => $postBody];
92 $params = array_merge($params, $optParams);
93 return $this->call('complete', [$params], GoogleCloudAiplatformV1Trial::class);
94 }
95 /**
96 * Adds a user provided Trial to a Study. (trials.create)
97 *
98 * @param string $parent Required. The resource name of the Study to create the
99 * Trial in. Format: `projects/{project}/locations/{location}/studies/{study}`
100 * @param GoogleCloudAiplatformV1Trial $postBody
101 * @param array $optParams Optional parameters.
102 * @return GoogleCloudAiplatformV1Trial
103 * @throws \Google\Service\Exception
104 */
105 public function create($parent, GoogleCloudAiplatformV1Trial $postBody, $optParams = [])
106 {
107 $params = ['parent' => $parent, 'postBody' => $postBody];
108 $params = array_merge($params, $optParams);
109 return $this->call('create', [$params], GoogleCloudAiplatformV1Trial::class);
110 }
111 /**
112 * Deletes a Trial. (trials.delete)
113 *
114 * @param string $name Required. The Trial's name. Format:
115 * `projects/{project}/locations/{location}/studies/{study}/trials/{trial}`
116 * @param array $optParams Optional parameters.
117 * @return GoogleProtobufEmpty
118 * @throws \Google\Service\Exception
119 */
120 public function delete($name, $optParams = [])
121 {
122 $params = ['name' => $name];
123 $params = array_merge($params, $optParams);
124 return $this->call('delete', [$params], GoogleProtobufEmpty::class);
125 }
126 /**
127 * Gets a Trial. (trials.get)
128 *
129 * @param string $name Required. The name of the Trial resource. Format:
130 * `projects/{project}/locations/{location}/studies/{study}/trials/{trial}`
131 * @param array $optParams Optional parameters.
132 * @return GoogleCloudAiplatformV1Trial
133 * @throws \Google\Service\Exception
134 */
135 public function get($name, $optParams = [])
136 {
137 $params = ['name' => $name];
138 $params = array_merge($params, $optParams);
139 return $this->call('get', [$params], GoogleCloudAiplatformV1Trial::class);
140 }
141 /**
142 * Lists the Trials associated with a Study.
143 * (trials.listProjectsLocationsStudiesTrials)
144 *
145 * @param string $parent Required. The resource name of the Study to list the
146 * Trial from. Format: `projects/{project}/locations/{location}/studies/{study}`
147 * @param array $optParams Optional parameters.
148 *
149 * @opt_param int pageSize Optional. The number of Trials to retrieve per "page"
150 * of results. If unspecified, the service will pick an appropriate default.
151 * @opt_param string pageToken Optional. A page token to request the next page
152 * of results. If unspecified, there are no subsequent pages.
153 * @return GoogleCloudAiplatformV1ListTrialsResponse
154 * @throws \Google\Service\Exception
155 */
156 public function listProjectsLocationsStudiesTrials($parent, $optParams = [])
157 {
158 $params = ['parent' => $parent];
159 $params = array_merge($params, $optParams);
160 return $this->call('list', [$params], GoogleCloudAiplatformV1ListTrialsResponse::class);
161 }
162 /**
163 * Lists the pareto-optimal Trials for multi-objective Study or the optimal
164 * Trials for single-objective Study. The definition of pareto-optimal can be
165 * checked in wiki page. https://en.wikipedia.org/wiki/Pareto_efficiency
166 * (trials.listOptimalTrials)
167 *
168 * @param string $parent Required. The name of the Study that the optimal Trial
169 * belongs to.
170 * @param GoogleCloudAiplatformV1ListOptimalTrialsRequest $postBody
171 * @param array $optParams Optional parameters.
172 * @return GoogleCloudAiplatformV1ListOptimalTrialsResponse
173 * @throws \Google\Service\Exception
174 */
175 public function listOptimalTrials($parent, GoogleCloudAiplatformV1ListOptimalTrialsRequest $postBody, $optParams = [])
176 {
177 $params = ['parent' => $parent, 'postBody' => $postBody];
178 $params = array_merge($params, $optParams);
179 return $this->call('listOptimalTrials', [$params], GoogleCloudAiplatformV1ListOptimalTrialsResponse::class);
180 }
181 /**
182 * Stops a Trial. (trials.stop)
183 *
184 * @param string $name Required. The Trial's name. Format:
185 * `projects/{project}/locations/{location}/studies/{study}/trials/{trial}`
186 * @param GoogleCloudAiplatformV1StopTrialRequest $postBody
187 * @param array $optParams Optional parameters.
188 * @return GoogleCloudAiplatformV1Trial
189 * @throws \Google\Service\Exception
190 */
191 public function stop($name, GoogleCloudAiplatformV1StopTrialRequest $postBody, $optParams = [])
192 {
193 $params = ['name' => $name, 'postBody' => $postBody];
194 $params = array_merge($params, $optParams);
195 return $this->call('stop', [$params], GoogleCloudAiplatformV1Trial::class);
196 }
197 /**
198 * Adds one or more Trials to a Study, with parameter values suggested by Vertex
199 * AI Vizier. Returns a long-running operation associated with the generation of
200 * Trial suggestions. When this long-running operation succeeds, it will contain
201 * a SuggestTrialsResponse. (trials.suggest)
202 *
203 * @param string $parent Required. The project and location that the Study
204 * belongs to. Format: `projects/{project}/locations/{location}/studies/{study}`
205 * @param GoogleCloudAiplatformV1SuggestTrialsRequest $postBody
206 * @param array $optParams Optional parameters.
207 * @return GoogleLongrunningOperation
208 * @throws \Google\Service\Exception
209 */
210 public function suggest($parent, GoogleCloudAiplatformV1SuggestTrialsRequest $postBody, $optParams = [])
211 {
212 $params = ['parent' => $parent, 'postBody' => $postBody];
213 $params = array_merge($params, $optParams);
214 return $this->call('suggest', [$params], GoogleLongrunningOperation::class);
215 }
216}
217
218// Adding a class alias for backwards compatibility with the previous class name.
219class_alias(ProjectsLocationsStudiesTrials::class, 'Google_Service_Aiplatform_Resource_ProjectsLocationsStudiesTrials');
Note: See TracBrowser for help on using the repository browser.