Google Cloud Native is in preview. Google Cloud Classic is fully supported.
google-native.ml/v1.Trial
Explore with Pulumi AI
Google Cloud Native is in preview. Google Cloud Classic is fully supported.
Adds a user provided trial to a study. Auto-naming is currently not supported for this resource.
Create Trial Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Trial(name: string, args: TrialArgs, opts?: CustomResourceOptions);
@overload
def Trial(resource_name: str,
args: TrialArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Trial(resource_name: str,
opts: Optional[ResourceOptions] = None,
study_id: Optional[str] = None,
final_measurement: Optional[GoogleCloudMlV1__MeasurementArgs] = None,
location: Optional[str] = None,
measurements: Optional[Sequence[GoogleCloudMlV1__MeasurementArgs]] = None,
parameters: Optional[Sequence[GoogleCloudMlV1_Trial_ParameterArgs]] = None,
project: Optional[str] = None,
state: Optional[TrialState] = None)
func NewTrial(ctx *Context, name string, args TrialArgs, opts ...ResourceOption) (*Trial, error)
public Trial(string name, TrialArgs args, CustomResourceOptions? opts = null)
type: google-native:ml/v1:Trial
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args TrialArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args TrialArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args TrialArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TrialArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TrialArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var exampletrialResourceResourceFromMlv1 = new GoogleNative.Ml.V1.Trial("exampletrialResourceResourceFromMlv1", new()
{
StudyId = "string",
FinalMeasurement = new GoogleNative.Ml.V1.Inputs.GoogleCloudMlV1__MeasurementArgs
{
Metrics = new[]
{
new GoogleNative.Ml.V1.Inputs.GoogleCloudMlV1_Measurement_MetricArgs
{
Metric = "string",
Value = 0,
},
},
StepCount = "string",
},
Location = "string",
Measurements = new[]
{
new GoogleNative.Ml.V1.Inputs.GoogleCloudMlV1__MeasurementArgs
{
Metrics = new[]
{
new GoogleNative.Ml.V1.Inputs.GoogleCloudMlV1_Measurement_MetricArgs
{
Metric = "string",
Value = 0,
},
},
StepCount = "string",
},
},
Parameters = new[]
{
new GoogleNative.Ml.V1.Inputs.GoogleCloudMlV1_Trial_ParameterArgs
{
FloatValue = 0,
IntValue = "string",
Parameter = "string",
StringValue = "string",
},
},
Project = "string",
State = GoogleNative.Ml.V1.TrialState.StateUnspecified,
});
example, err := ml.NewTrial(ctx, "exampletrialResourceResourceFromMlv1", &ml.TrialArgs{
StudyId: pulumi.String("string"),
FinalMeasurement: &ml.GoogleCloudMlV1__MeasurementArgs{
Metrics: ml.GoogleCloudMlV1_Measurement_MetricArray{
&ml.GoogleCloudMlV1_Measurement_MetricArgs{
Metric: pulumi.String("string"),
Value: pulumi.Float64(0),
},
},
StepCount: pulumi.String("string"),
},
Location: pulumi.String("string"),
Measurements: ml.GoogleCloudMlV1__MeasurementArray{
&ml.GoogleCloudMlV1__MeasurementArgs{
Metrics: ml.GoogleCloudMlV1_Measurement_MetricArray{
&ml.GoogleCloudMlV1_Measurement_MetricArgs{
Metric: pulumi.String("string"),
Value: pulumi.Float64(0),
},
},
StepCount: pulumi.String("string"),
},
},
Parameters: ml.GoogleCloudMlV1_Trial_ParameterArray{
&ml.GoogleCloudMlV1_Trial_ParameterArgs{
FloatValue: pulumi.Float64(0),
IntValue: pulumi.String("string"),
Parameter: pulumi.String("string"),
StringValue: pulumi.String("string"),
},
},
Project: pulumi.String("string"),
State: ml.TrialStateStateUnspecified,
})
var exampletrialResourceResourceFromMlv1 = new Trial("exampletrialResourceResourceFromMlv1", TrialArgs.builder()
.studyId("string")
.finalMeasurement(GoogleCloudMlV1__MeasurementArgs.builder()
.metrics(GoogleCloudMlV1_Measurement_MetricArgs.builder()
.metric("string")
.value(0)
.build())
.stepCount("string")
.build())
.location("string")
.measurements(GoogleCloudMlV1__MeasurementArgs.builder()
.metrics(GoogleCloudMlV1_Measurement_MetricArgs.builder()
.metric("string")
.value(0)
.build())
.stepCount("string")
.build())
.parameters(GoogleCloudMlV1_Trial_ParameterArgs.builder()
.floatValue(0)
.intValue("string")
.parameter("string")
.stringValue("string")
.build())
.project("string")
.state("STATE_UNSPECIFIED")
.build());
exampletrial_resource_resource_from_mlv1 = google_native.ml.v1.Trial("exampletrialResourceResourceFromMlv1",
study_id="string",
final_measurement={
"metrics": [{
"metric": "string",
"value": 0,
}],
"step_count": "string",
},
location="string",
measurements=[{
"metrics": [{
"metric": "string",
"value": 0,
}],
"step_count": "string",
}],
parameters=[{
"float_value": 0,
"int_value": "string",
"parameter": "string",
"string_value": "string",
}],
project="string",
state=google_native.ml.v1.TrialState.STATE_UNSPECIFIED)
const exampletrialResourceResourceFromMlv1 = new google_native.ml.v1.Trial("exampletrialResourceResourceFromMlv1", {
studyId: "string",
finalMeasurement: {
metrics: [{
metric: "string",
value: 0,
}],
stepCount: "string",
},
location: "string",
measurements: [{
metrics: [{
metric: "string",
value: 0,
}],
stepCount: "string",
}],
parameters: [{
floatValue: 0,
intValue: "string",
parameter: "string",
stringValue: "string",
}],
project: "string",
state: google_native.ml.v1.TrialState.StateUnspecified,
});
type: google-native:ml/v1:Trial
properties:
finalMeasurement:
metrics:
- metric: string
value: 0
stepCount: string
location: string
measurements:
- metrics:
- metric: string
value: 0
stepCount: string
parameters:
- floatValue: 0
intValue: string
parameter: string
stringValue: string
project: string
state: STATE_UNSPECIFIED
studyId: string
Trial Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Trial resource accepts the following input properties:
- Study
Id string - Final
Measurement Pulumi.Google Native. Ml. V1. Inputs. Google Cloud Ml V1__Measurement - The final measurement containing the objective value.
- Location string
- Measurements
List<Pulumi.
Google Native. Ml. V1. Inputs. Google Cloud Ml V1__Measurement> - A list of measurements that are strictly lexicographically ordered by their induced tuples (steps, elapsed_time). These are used for early stopping computations.
- Parameters
List<Pulumi.
Google Native. Ml. V1. Inputs. Google Cloud Ml V1_Trial_Parameter> - The parameters of the trial.
- Project string
- State
Pulumi.
Google Native. Ml. V1. Trial State - The detailed state of a trial.
- Study
Id string - Final
Measurement GoogleCloud Ml V1__Measurement Args - The final measurement containing the objective value.
- Location string
- Measurements
[]Google
Cloud Ml V1__Measurement Args - A list of measurements that are strictly lexicographically ordered by their induced tuples (steps, elapsed_time). These are used for early stopping computations.
- Parameters
[]Google
Cloud Ml V1_Trial_Parameter Args - The parameters of the trial.
- Project string
- State
Trial
State Enum - The detailed state of a trial.
- study
Id String - final
Measurement GoogleCloud Ml V1__Measurement - The final measurement containing the objective value.
- location String
- measurements
List<Google
Cloud Ml V1__Measurement> - A list of measurements that are strictly lexicographically ordered by their induced tuples (steps, elapsed_time). These are used for early stopping computations.
- parameters
List<Google
Cloud Ml V1_Trial_Parameter> - The parameters of the trial.
- project String
- state
Trial
State - The detailed state of a trial.
- study
Id string - final
Measurement GoogleCloud Ml V1__Measurement - The final measurement containing the objective value.
- location string
- measurements
Google
Cloud Ml V1__Measurement[] - A list of measurements that are strictly lexicographically ordered by their induced tuples (steps, elapsed_time). These are used for early stopping computations.
- parameters
Google
Cloud Ml V1_Trial_Parameter[] - The parameters of the trial.
- project string
- state
Trial
State - The detailed state of a trial.
- study_
id str - final_
measurement GoogleCloud Ml V1Measurement Args - The final measurement containing the objective value.
- location str
- measurements
Sequence[Google
Cloud Ml V1Measurement Args] - A list of measurements that are strictly lexicographically ordered by their induced tuples (steps, elapsed_time). These are used for early stopping computations.
- parameters
Sequence[Google
Cloud Ml V1Trial_Parameter Args] - The parameters of the trial.
- project str
- state
Trial
State - The detailed state of a trial.
- study
Id String - final
Measurement Property Map - The final measurement containing the objective value.
- location String
- measurements List<Property Map>
- A list of measurements that are strictly lexicographically ordered by their induced tuples (steps, elapsed_time). These are used for early stopping computations.
- parameters List<Property Map>
- The parameters of the trial.
- project String
- state "STATE_UNSPECIFIED" | "REQUESTED" | "ACTIVE" | "COMPLETED" | "STOPPING"
- The detailed state of a trial.
Outputs
All input properties are implicitly available as output properties. Additionally, the Trial resource produces the following output properties:
- Client
Id string - The identifier of the client that originally requested this trial.
- End
Time string - Time at which the trial's status changed to COMPLETED.
- Id string
- The provider-assigned unique ID for this managed resource.
- Infeasible
Reason string - A human readable string describing why the trial is infeasible. This should only be set if trial_infeasible is true.
- Name string
- Name of the trial assigned by the service.
- Start
Time string - Time at which the trial was started.
- Trial
Infeasible bool - If true, the parameters in this trial are not attempted again.
- Client
Id string - The identifier of the client that originally requested this trial.
- End
Time string - Time at which the trial's status changed to COMPLETED.
- Id string
- The provider-assigned unique ID for this managed resource.
- Infeasible
Reason string - A human readable string describing why the trial is infeasible. This should only be set if trial_infeasible is true.
- Name string
- Name of the trial assigned by the service.
- Start
Time string - Time at which the trial was started.
- Trial
Infeasible bool - If true, the parameters in this trial are not attempted again.
- client
Id String - The identifier of the client that originally requested this trial.
- end
Time String - Time at which the trial's status changed to COMPLETED.
- id String
- The provider-assigned unique ID for this managed resource.
- infeasible
Reason String - A human readable string describing why the trial is infeasible. This should only be set if trial_infeasible is true.
- name String
- Name of the trial assigned by the service.
- start
Time String - Time at which the trial was started.
- trial
Infeasible Boolean - If true, the parameters in this trial are not attempted again.
- client
Id string - The identifier of the client that originally requested this trial.
- end
Time string - Time at which the trial's status changed to COMPLETED.
- id string
- The provider-assigned unique ID for this managed resource.
- infeasible
Reason string - A human readable string describing why the trial is infeasible. This should only be set if trial_infeasible is true.
- name string
- Name of the trial assigned by the service.
- start
Time string - Time at which the trial was started.
- trial
Infeasible boolean - If true, the parameters in this trial are not attempted again.
- client_
id str - The identifier of the client that originally requested this trial.
- end_
time str - Time at which the trial's status changed to COMPLETED.
- id str
- The provider-assigned unique ID for this managed resource.
- infeasible_
reason str - A human readable string describing why the trial is infeasible. This should only be set if trial_infeasible is true.
- name str
- Name of the trial assigned by the service.
- start_
time str - Time at which the trial was started.
- trial_
infeasible bool - If true, the parameters in this trial are not attempted again.
- client
Id String - The identifier of the client that originally requested this trial.
- end
Time String - Time at which the trial's status changed to COMPLETED.
- id String
- The provider-assigned unique ID for this managed resource.
- infeasible
Reason String - A human readable string describing why the trial is infeasible. This should only be set if trial_infeasible is true.
- name String
- Name of the trial assigned by the service.
- start
Time String - Time at which the trial was started.
- trial
Infeasible Boolean - If true, the parameters in this trial are not attempted again.
Supporting Types
GoogleCloudMlV1_Measurement_Metric, GoogleCloudMlV1_Measurement_MetricArgs
GoogleCloudMlV1_Measurement_MetricResponse, GoogleCloudMlV1_Measurement_MetricResponseArgs
GoogleCloudMlV1_Trial_Parameter, GoogleCloudMlV1_Trial_ParameterArgs
- Float
Value double - Must be set if ParameterType is DOUBLE or DISCRETE.
- Int
Value string - Must be set if ParameterType is INTEGER
- Parameter string
- The name of the parameter.
- String
Value string - Must be set if ParameterTypeis CATEGORICAL
- Float
Value float64 - Must be set if ParameterType is DOUBLE or DISCRETE.
- Int
Value string - Must be set if ParameterType is INTEGER
- Parameter string
- The name of the parameter.
- String
Value string - Must be set if ParameterTypeis CATEGORICAL
- float
Value Double - Must be set if ParameterType is DOUBLE or DISCRETE.
- int
Value String - Must be set if ParameterType is INTEGER
- parameter String
- The name of the parameter.
- string
Value String - Must be set if ParameterTypeis CATEGORICAL
- float
Value number - Must be set if ParameterType is DOUBLE or DISCRETE.
- int
Value string - Must be set if ParameterType is INTEGER
- parameter string
- The name of the parameter.
- string
Value string - Must be set if ParameterTypeis CATEGORICAL
- float_
value float - Must be set if ParameterType is DOUBLE or DISCRETE.
- int_
value str - Must be set if ParameterType is INTEGER
- parameter str
- The name of the parameter.
- string_
value str - Must be set if ParameterTypeis CATEGORICAL
- float
Value Number - Must be set if ParameterType is DOUBLE or DISCRETE.
- int
Value String - Must be set if ParameterType is INTEGER
- parameter String
- The name of the parameter.
- string
Value String - Must be set if ParameterTypeis CATEGORICAL
GoogleCloudMlV1_Trial_ParameterResponse, GoogleCloudMlV1_Trial_ParameterResponseArgs
- Float
Value double - Must be set if ParameterType is DOUBLE or DISCRETE.
- Int
Value string - Must be set if ParameterType is INTEGER
- Parameter string
- The name of the parameter.
- String
Value string - Must be set if ParameterTypeis CATEGORICAL
- Float
Value float64 - Must be set if ParameterType is DOUBLE or DISCRETE.
- Int
Value string - Must be set if ParameterType is INTEGER
- Parameter string
- The name of the parameter.
- String
Value string - Must be set if ParameterTypeis CATEGORICAL
- float
Value Double - Must be set if ParameterType is DOUBLE or DISCRETE.
- int
Value String - Must be set if ParameterType is INTEGER
- parameter String
- The name of the parameter.
- string
Value String - Must be set if ParameterTypeis CATEGORICAL
- float
Value number - Must be set if ParameterType is DOUBLE or DISCRETE.
- int
Value string - Must be set if ParameterType is INTEGER
- parameter string
- The name of the parameter.
- string
Value string - Must be set if ParameterTypeis CATEGORICAL
- float_
value float - Must be set if ParameterType is DOUBLE or DISCRETE.
- int_
value str - Must be set if ParameterType is INTEGER
- parameter str
- The name of the parameter.
- string_
value str - Must be set if ParameterTypeis CATEGORICAL
- float
Value Number - Must be set if ParameterType is DOUBLE or DISCRETE.
- int
Value String - Must be set if ParameterType is INTEGER
- parameter String
- The name of the parameter.
- string
Value String - Must be set if ParameterTypeis CATEGORICAL
GoogleCloudMlV1__Measurement, GoogleCloudMlV1__MeasurementArgs
- Metrics
List<Pulumi.
Google Native. Ml. V1. Inputs. Google Cloud Ml V1_Measurement_Metric> - Provides a list of metrics that act as inputs into the objective function.
- Step
Count string - The number of steps a machine learning model has been trained for. Must be non-negative.
- Metrics
[]Google
Cloud Ml V1_Measurement_Metric - Provides a list of metrics that act as inputs into the objective function.
- Step
Count string - The number of steps a machine learning model has been trained for. Must be non-negative.
- metrics
List<Google
Cloud Ml V1_Measurement_Metric> - Provides a list of metrics that act as inputs into the objective function.
- step
Count String - The number of steps a machine learning model has been trained for. Must be non-negative.
- metrics
Google
Cloud Ml V1_Measurement_Metric[] - Provides a list of metrics that act as inputs into the objective function.
- step
Count string - The number of steps a machine learning model has been trained for. Must be non-negative.
- metrics
Sequence[Google
Cloud Ml V1Measurement_Metric] - Provides a list of metrics that act as inputs into the objective function.
- step_
count str - The number of steps a machine learning model has been trained for. Must be non-negative.
- metrics List<Property Map>
- Provides a list of metrics that act as inputs into the objective function.
- step
Count String - The number of steps a machine learning model has been trained for. Must be non-negative.
GoogleCloudMlV1__MeasurementResponse, GoogleCloudMlV1__MeasurementResponseArgs
- Elapsed
Time string - Time that the trial has been running at the point of this measurement.
- Metrics
List<Pulumi.
Google Native. Ml. V1. Inputs. Google Cloud Ml V1_Measurement_Metric Response> - Provides a list of metrics that act as inputs into the objective function.
- Step
Count string - The number of steps a machine learning model has been trained for. Must be non-negative.
- Elapsed
Time string - Time that the trial has been running at the point of this measurement.
- Metrics
[]Google
Cloud Ml V1_Measurement_Metric Response - Provides a list of metrics that act as inputs into the objective function.
- Step
Count string - The number of steps a machine learning model has been trained for. Must be non-negative.
- elapsed
Time String - Time that the trial has been running at the point of this measurement.
- metrics
List<Google
Cloud Ml V1_Measurement_Metric Response> - Provides a list of metrics that act as inputs into the objective function.
- step
Count String - The number of steps a machine learning model has been trained for. Must be non-negative.
- elapsed
Time string - Time that the trial has been running at the point of this measurement.
- metrics
Google
Cloud Ml V1_Measurement_Metric Response[] - Provides a list of metrics that act as inputs into the objective function.
- step
Count string - The number of steps a machine learning model has been trained for. Must be non-negative.
- elapsed_
time str - Time that the trial has been running at the point of this measurement.
- metrics
Sequence[Google
Cloud Ml V1Measurement_Metric Response] - Provides a list of metrics that act as inputs into the objective function.
- step_
count str - The number of steps a machine learning model has been trained for. Must be non-negative.
- elapsed
Time String - Time that the trial has been running at the point of this measurement.
- metrics List<Property Map>
- Provides a list of metrics that act as inputs into the objective function.
- step
Count String - The number of steps a machine learning model has been trained for. Must be non-negative.
TrialState, TrialStateArgs
- State
Unspecified - STATE_UNSPECIFIEDThe trial state is unspecified.
- Requested
- REQUESTEDIndicates that a specific trial has been requested, but it has not yet been suggested by the service.
- Active
- ACTIVEIndicates that the trial has been suggested.
- Completed
- COMPLETEDIndicates that the trial is done, and either has a final_measurement set, or is marked as trial_infeasible.
- Stopping
- STOPPINGIndicates that the trial should stop according to the service.
- Trial
State State Unspecified - STATE_UNSPECIFIEDThe trial state is unspecified.
- Trial
State Requested - REQUESTEDIndicates that a specific trial has been requested, but it has not yet been suggested by the service.
- Trial
State Active - ACTIVEIndicates that the trial has been suggested.
- Trial
State Completed - COMPLETEDIndicates that the trial is done, and either has a final_measurement set, or is marked as trial_infeasible.
- Trial
State Stopping - STOPPINGIndicates that the trial should stop according to the service.
- State
Unspecified - STATE_UNSPECIFIEDThe trial state is unspecified.
- Requested
- REQUESTEDIndicates that a specific trial has been requested, but it has not yet been suggested by the service.
- Active
- ACTIVEIndicates that the trial has been suggested.
- Completed
- COMPLETEDIndicates that the trial is done, and either has a final_measurement set, or is marked as trial_infeasible.
- Stopping
- STOPPINGIndicates that the trial should stop according to the service.
- State
Unspecified - STATE_UNSPECIFIEDThe trial state is unspecified.
- Requested
- REQUESTEDIndicates that a specific trial has been requested, but it has not yet been suggested by the service.
- Active
- ACTIVEIndicates that the trial has been suggested.
- Completed
- COMPLETEDIndicates that the trial is done, and either has a final_measurement set, or is marked as trial_infeasible.
- Stopping
- STOPPINGIndicates that the trial should stop according to the service.
- STATE_UNSPECIFIED
- STATE_UNSPECIFIEDThe trial state is unspecified.
- REQUESTED
- REQUESTEDIndicates that a specific trial has been requested, but it has not yet been suggested by the service.
- ACTIVE
- ACTIVEIndicates that the trial has been suggested.
- COMPLETED
- COMPLETEDIndicates that the trial is done, and either has a final_measurement set, or is marked as trial_infeasible.
- STOPPING
- STOPPINGIndicates that the trial should stop according to the service.
- "STATE_UNSPECIFIED"
- STATE_UNSPECIFIEDThe trial state is unspecified.
- "REQUESTED"
- REQUESTEDIndicates that a specific trial has been requested, but it has not yet been suggested by the service.
- "ACTIVE"
- ACTIVEIndicates that the trial has been suggested.
- "COMPLETED"
- COMPLETEDIndicates that the trial is done, and either has a final_measurement set, or is marked as trial_infeasible.
- "STOPPING"
- STOPPINGIndicates that the trial should stop according to the service.
Package Details
- Repository
- Google Cloud Native pulumi/pulumi-google-native
- License
- Apache-2.0
Google Cloud Native is in preview. Google Cloud Classic is fully supported.