trials
Creates, updates, deletes, gets or lists a trials
resource.
Overview
Name | trials |
Type | Resource |
Id | google.ml.trials |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_studies_trials_get
- projects_locations_studies_trials_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. Name of the trial assigned by the service. |
clientId | string | Output only. The identifier of the client that originally requested this trial. |
endTime | string (google-datetime) | Output only. Time at which the trial's status changed to COMPLETED. |
finalMeasurement | object | The final measurement containing the objective value. (id: GoogleCloudMlV1__Measurement) |
infeasibleReason | string | Output only. A human readable string describing why the trial is infeasible. This should only be set if trial_infeasible is true. |
measurements | array | A list of measurements that are strictly lexicographically ordered by their induced tuples (steps, elapsed_time). These are used for early stopping computations. |
parameters | array | The parameters of the trial. |
startTime | string (google-datetime) | Output only. Time at which the trial was started. |
state | string | The detailed state of a trial. |
trialInfeasible | boolean | Output only. If true, the parameters in this trial are not attempted again. |
Successful response
Name | Datatype | Description |
---|---|---|
trials | array | The trials associated with the study. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_locations_studies_trials_get | select | projectsId , locationsId , studiesId , trialsId | Gets a trial. | |
projects_locations_studies_trials_list | select | projectsId , locationsId , studiesId | Lists the trials associated with a study. | |
projects_locations_studies_trials_create | insert | projectsId , locationsId , studiesId | Adds a user provided trial to a study. | |
projects_locations_studies_trials_delete | delete | projectsId , locationsId , studiesId , trialsId | Deletes a trial. | |
projects_locations_studies_trials_suggest | exec | projectsId , locationsId , studiesId | Adds one or more trials to a study, with parameter values suggested by AI Platform Vizier. Returns a long-running operation associated with the generation of trial suggestions. When this long-running operation succeeds, it will contain a SuggestTrialsResponse. | |
projects_locations_studies_trials_complete | exec | projectsId , locationsId , studiesId , trialsId | Marks a trial as complete. | |
projects_locations_studies_trials_check_early_stopping_state | exec | projectsId , locationsId , studiesId , trialsId | Checks whether a trial should stop or not. Returns a long-running operation. When the operation is successful, it will contain a CheckTrialEarlyStoppingStateResponse. | |
projects_locations_studies_trials_stop | exec | projectsId , locationsId , studiesId , trialsId | Stops a trial. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
locationsId | string | |
projectsId | string | |
studiesId | string | |
trialsId | string |
SELECT
examples
- projects_locations_studies_trials_get
- projects_locations_studies_trials_list
Gets a trial.
SELECT
name,
clientId,
endTime,
finalMeasurement,
infeasibleReason,
measurements,
parameters,
startTime,
state,
trialInfeasible
FROM google.ml.trials
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND studiesId = '{{ studiesId }}' -- required
AND trialsId = '{{ trialsId }}' -- required;
Lists the trials associated with a study.
SELECT
trials
FROM google.ml.trials
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND studiesId = '{{ studiesId }}' -- required;
INSERT
examples
- projects_locations_studies_trials_create
- Manifest
Adds a user provided trial to a study.
INSERT INTO google.ml.trials (
data__state,
data__parameters,
data__finalMeasurement,
data__measurements,
projectsId,
locationsId,
studiesId
)
SELECT
'{{ state }}',
'{{ parameters }}',
'{{ finalMeasurement }}',
'{{ measurements }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ studiesId }}'
RETURNING
name,
clientId,
endTime,
finalMeasurement,
infeasibleReason,
measurements,
parameters,
startTime,
state,
trialInfeasible
;
# Description fields are for documentation purposes
- name: trials
props:
- name: projectsId
value: string
description: Required parameter for the trials resource.
- name: locationsId
value: string
description: Required parameter for the trials resource.
- name: studiesId
value: string
description: Required parameter for the trials resource.
- name: state
value: string
description: >
The detailed state of a trial.
valid_values: ['STATE_UNSPECIFIED', 'REQUESTED', 'ACTIVE', 'COMPLETED', 'STOPPING']
- name: parameters
value: array
description: >
The parameters of the trial.
- name: finalMeasurement
value: object
description: >
The final measurement containing the objective value.
- name: measurements
value: array
description: >
A list of measurements that are strictly lexicographically ordered by their induced tuples (steps, elapsed_time). These are used for early stopping computations.
DELETE
examples
- projects_locations_studies_trials_delete
Deletes a trial.
DELETE FROM google.ml.trials
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND studiesId = '{{ studiesId }}' --required
AND trialsId = '{{ trialsId }}' --required;
Lifecycle Methods
- projects_locations_studies_trials_suggest
- projects_locations_studies_trials_complete
- projects_locations_studies_trials_check_early_stopping_state
- projects_locations_studies_trials_stop
Adds one or more trials to a study, with parameter values suggested by AI Platform Vizier. Returns a long-running operation associated with the generation of trial suggestions. When this long-running operation succeeds, it will contain a SuggestTrialsResponse.
EXEC google.ml.trials.projects_locations_studies_trials_suggest
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@studiesId='{{ studiesId }}' --required
@@json=
'{
"suggestionCount": {{ suggestionCount }},
"clientId": "{{ clientId }}"
}';
Marks a trial as complete.
EXEC google.ml.trials.projects_locations_studies_trials_complete
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@studiesId='{{ studiesId }}' --required,
@trialsId='{{ trialsId }}' --required
@@json=
'{
"finalMeasurement": "{{ finalMeasurement }}",
"trialInfeasible": {{ trialInfeasible }},
"infeasibleReason": "{{ infeasibleReason }}"
}';
Checks whether a trial should stop or not. Returns a long-running operation. When the operation is successful, it will contain a CheckTrialEarlyStoppingStateResponse.
EXEC google.ml.trials.projects_locations_studies_trials_check_early_stopping_state
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@studiesId='{{ studiesId }}' --required,
@trialsId='{{ trialsId }}' --required;
Stops a trial.
EXEC google.ml.trials.projects_locations_studies_trials_stop
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@studiesId='{{ studiesId }}' --required,
@trialsId='{{ trialsId }}' --required;