#[non_exhaustive]pub struct Trial {
pub name: String,
pub id: String,
pub state: State,
pub parameters: Vec<Parameter>,
pub final_measurement: Option<Measurement>,
pub measurements: Vec<Measurement>,
pub start_time: Option<Timestamp>,
pub end_time: Option<Timestamp>,
pub client_id: String,
pub infeasible_reason: String,
pub custom_job: String,
pub web_access_uris: HashMap<String, String>,
/* private fields */
}job-service or vizier-service only.Expand description
A message representing a Trial. A Trial contains a unique set of Parameters that has been or will be evaluated, along with the objective metrics got by running the Trial.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringOutput only. Resource name of the Trial assigned by the service.
id: StringOutput only. The identifier of the Trial assigned by the service.
state: StateOutput only. The detailed state of the Trial.
parameters: Vec<Parameter>Output only. The parameters of the Trial.
final_measurement: Option<Measurement>Output only. The final measurement containing the objective value.
measurements: Vec<Measurement>Output only. A list of measurements that are strictly lexicographically ordered by their induced tuples (steps, elapsed_duration). These are used for early stopping computations.
start_time: Option<Timestamp>Output only. Time when the Trial was started.
end_time: Option<Timestamp>Output only. Time when the Trial’s status changed to SUCCEEDED or
INFEASIBLE.
client_id: StringOutput only. The identifier of the client that originally requested this Trial. Each client is identified by a unique client_id. When a client asks for a suggestion, Vertex AI Vizier will assign it a Trial. The client should evaluate the Trial, complete it, and report back to Vertex AI Vizier. If suggestion is asked again by same client_id before the Trial is completed, the same Trial will be returned. Multiple clients with different client_ids can ask for suggestions simultaneously, each of them will get their own Trial.
infeasible_reason: StringOutput only. A human readable string describing why the Trial is
infeasible. This is set only if Trial state is INFEASIBLE.
custom_job: StringOutput only. The CustomJob name linked to the Trial. It’s set for a HyperparameterTuningJob’s Trial.
web_access_uris: HashMap<String, String>Output only. URIs for accessing interactive
shells
(one URI for each training node). Only available if this trial is part of
a
HyperparameterTuningJob
and the job’s
trial_job_spec.enable_web_access
field is true.
The keys are names of each node used for the trial; for example,
workerpool0-0 for the primary node, workerpool1-0 for the first node in
the second worker pool, and workerpool1-1 for the second node in the
second worker pool.
The values are the URIs for each node’s interactive shell.
Implementations§
Source§impl Trial
impl Trial
pub fn new() -> Self
Sourcepub fn set_parameters<T, V>(self, v: T) -> Self
pub fn set_parameters<T, V>(self, v: T) -> Self
Sets the value of parameters.
§Example
use google_cloud_aiplatform_v1::model::trial::Parameter;
let x = Trial::new()
.set_parameters([
Parameter::default()/* use setters */,
Parameter::default()/* use (different) setters */,
]);Sourcepub fn set_final_measurement<T>(self, v: T) -> Selfwhere
T: Into<Measurement>,
pub fn set_final_measurement<T>(self, v: T) -> Selfwhere
T: Into<Measurement>,
Sets the value of final_measurement.
§Example
use google_cloud_aiplatform_v1::model::Measurement;
let x = Trial::new().set_final_measurement(Measurement::default()/* use setters */);Sourcepub fn set_or_clear_final_measurement<T>(self, v: Option<T>) -> Selfwhere
T: Into<Measurement>,
pub fn set_or_clear_final_measurement<T>(self, v: Option<T>) -> Selfwhere
T: Into<Measurement>,
Sets or clears the value of final_measurement.
§Example
use google_cloud_aiplatform_v1::model::Measurement;
let x = Trial::new().set_or_clear_final_measurement(Some(Measurement::default()/* use setters */));
let x = Trial::new().set_or_clear_final_measurement(None::<Measurement>);Sourcepub fn set_measurements<T, V>(self, v: T) -> Self
pub fn set_measurements<T, V>(self, v: T) -> Self
Sets the value of measurements.
§Example
use google_cloud_aiplatform_v1::model::Measurement;
let x = Trial::new()
.set_measurements([
Measurement::default()/* use setters */,
Measurement::default()/* use (different) setters */,
]);Sourcepub fn set_start_time<T>(self, v: T) -> Self
pub fn set_start_time<T>(self, v: T) -> Self
Sets the value of start_time.
§Example
use wkt::Timestamp;
let x = Trial::new().set_start_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_start_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_start_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of start_time.
§Example
use wkt::Timestamp;
let x = Trial::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
let x = Trial::new().set_or_clear_start_time(None::<Timestamp>);Sourcepub fn set_end_time<T>(self, v: T) -> Self
pub fn set_end_time<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_end_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_end_time<T>(self, v: Option<T>) -> Self
Sourcepub fn set_client_id<T: Into<String>>(self, v: T) -> Self
pub fn set_client_id<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_infeasible_reason<T: Into<String>>(self, v: T) -> Self
pub fn set_infeasible_reason<T: Into<String>>(self, v: T) -> Self
Sets the value of infeasible_reason.
§Example
let x = Trial::new().set_infeasible_reason("example");Sourcepub fn set_custom_job<T: Into<String>>(self, v: T) -> Self
pub fn set_custom_job<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_web_access_uris<T, K, V>(self, v: T) -> Self
pub fn set_web_access_uris<T, K, V>(self, v: T) -> Self
Sets the value of web_access_uris.
§Example
let x = Trial::new().set_web_access_uris([
("key0", "abc"),
("key1", "xyz"),
]);