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:
- StudyId string
- FinalMeasurement 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.
- StudyId string
- FinalMeasurement GoogleCloud Ml V1__Measurement Args 
- The final measurement containing the objective value.
- Location string
- Measurements
[]GoogleCloud 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
[]GoogleCloud Ml V1_Trial_Parameter Args 
- The parameters of the trial.
- Project string
- State
TrialState Enum 
- The detailed state of a trial.
- studyId String
- finalMeasurement GoogleCloud Ml V1__Measurement 
- The final measurement containing the objective value.
- location String
- measurements
List<GoogleCloud 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<GoogleCloud Ml V1_Trial_Parameter> 
- The parameters of the trial.
- project String
- state
TrialState 
- The detailed state of a trial.
- studyId string
- finalMeasurement GoogleCloud Ml V1__Measurement 
- The final measurement containing the objective value.
- location string
- measurements
GoogleCloud 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
GoogleCloud Ml V1_Trial_Parameter[] 
- The parameters of the trial.
- project string
- state
TrialState 
- 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[GoogleCloud 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[GoogleCloud Ml V1Trial_Parameter Args] 
- The parameters of the trial.
- project str
- state
TrialState 
- The detailed state of a trial.
- studyId String
- finalMeasurement 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:
- ClientId string
- The identifier of the client that originally requested this trial.
- EndTime string
- Time at which the trial's status changed to COMPLETED.
- Id string
- The provider-assigned unique ID for this managed resource.
- InfeasibleReason 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.
- StartTime string
- Time at which the trial was started.
- TrialInfeasible bool
- If true, the parameters in this trial are not attempted again.
- ClientId string
- The identifier of the client that originally requested this trial.
- EndTime string
- Time at which the trial's status changed to COMPLETED.
- Id string
- The provider-assigned unique ID for this managed resource.
- InfeasibleReason 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.
- StartTime string
- Time at which the trial was started.
- TrialInfeasible bool
- If true, the parameters in this trial are not attempted again.
- clientId String
- The identifier of the client that originally requested this trial.
- endTime String
- Time at which the trial's status changed to COMPLETED.
- id String
- The provider-assigned unique ID for this managed resource.
- infeasibleReason 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.
- startTime String
- Time at which the trial was started.
- trialInfeasible Boolean
- If true, the parameters in this trial are not attempted again.
- clientId string
- The identifier of the client that originally requested this trial.
- endTime string
- Time at which the trial's status changed to COMPLETED.
- id string
- The provider-assigned unique ID for this managed resource.
- infeasibleReason 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.
- startTime string
- Time at which the trial was started.
- trialInfeasible 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.
- clientId String
- The identifier of the client that originally requested this trial.
- endTime String
- Time at which the trial's status changed to COMPLETED.
- id String
- The provider-assigned unique ID for this managed resource.
- infeasibleReason 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.
- startTime String
- Time at which the trial was started.
- trialInfeasible 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        
- FloatValue double
- Must be set if ParameterType is DOUBLE or DISCRETE.
- IntValue string
- Must be set if ParameterType is INTEGER
- Parameter string
- The name of the parameter.
- StringValue string
- Must be set if ParameterTypeis CATEGORICAL
- FloatValue float64
- Must be set if ParameterType is DOUBLE or DISCRETE.
- IntValue string
- Must be set if ParameterType is INTEGER
- Parameter string
- The name of the parameter.
- StringValue string
- Must be set if ParameterTypeis CATEGORICAL
- floatValue Double
- Must be set if ParameterType is DOUBLE or DISCRETE.
- intValue String
- Must be set if ParameterType is INTEGER
- parameter String
- The name of the parameter.
- stringValue String
- Must be set if ParameterTypeis CATEGORICAL
- floatValue number
- Must be set if ParameterType is DOUBLE or DISCRETE.
- intValue string
- Must be set if ParameterType is INTEGER
- parameter string
- The name of the parameter.
- stringValue 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
- floatValue Number
- Must be set if ParameterType is DOUBLE or DISCRETE.
- intValue String
- Must be set if ParameterType is INTEGER
- parameter String
- The name of the parameter.
- stringValue String
- Must be set if ParameterTypeis CATEGORICAL
GoogleCloudMlV1_Trial_ParameterResponse, GoogleCloudMlV1_Trial_ParameterResponseArgs          
- FloatValue double
- Must be set if ParameterType is DOUBLE or DISCRETE.
- IntValue string
- Must be set if ParameterType is INTEGER
- Parameter string
- The name of the parameter.
- StringValue string
- Must be set if ParameterTypeis CATEGORICAL
- FloatValue float64
- Must be set if ParameterType is DOUBLE or DISCRETE.
- IntValue string
- Must be set if ParameterType is INTEGER
- Parameter string
- The name of the parameter.
- StringValue string
- Must be set if ParameterTypeis CATEGORICAL
- floatValue Double
- Must be set if ParameterType is DOUBLE or DISCRETE.
- intValue String
- Must be set if ParameterType is INTEGER
- parameter String
- The name of the parameter.
- stringValue String
- Must be set if ParameterTypeis CATEGORICAL
- floatValue number
- Must be set if ParameterType is DOUBLE or DISCRETE.
- intValue string
- Must be set if ParameterType is INTEGER
- parameter string
- The name of the parameter.
- stringValue 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
- floatValue Number
- Must be set if ParameterType is DOUBLE or DISCRETE.
- intValue String
- Must be set if ParameterType is INTEGER
- parameter String
- The name of the parameter.
- stringValue 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.
- StepCount string
- The number of steps a machine learning model has been trained for. Must be non-negative.
- Metrics
[]GoogleCloud Ml V1_Measurement_Metric 
- Provides a list of metrics that act as inputs into the objective function.
- StepCount string
- The number of steps a machine learning model has been trained for. Must be non-negative.
- metrics
List<GoogleCloud Ml V1_Measurement_Metric> 
- Provides a list of metrics that act as inputs into the objective function.
- stepCount String
- The number of steps a machine learning model has been trained for. Must be non-negative.
- metrics
GoogleCloud Ml V1_Measurement_Metric[] 
- Provides a list of metrics that act as inputs into the objective function.
- stepCount string
- The number of steps a machine learning model has been trained for. Must be non-negative.
- metrics
Sequence[GoogleCloud 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.
- stepCount String
- The number of steps a machine learning model has been trained for. Must be non-negative.
GoogleCloudMlV1__MeasurementResponse, GoogleCloudMlV1__MeasurementResponseArgs          
- ElapsedTime 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.
- StepCount string
- The number of steps a machine learning model has been trained for. Must be non-negative.
- ElapsedTime string
- Time that the trial has been running at the point of this measurement.
- Metrics
[]GoogleCloud Ml V1_Measurement_Metric Response 
- Provides a list of metrics that act as inputs into the objective function.
- StepCount string
- The number of steps a machine learning model has been trained for. Must be non-negative.
- elapsedTime String
- Time that the trial has been running at the point of this measurement.
- metrics
List<GoogleCloud Ml V1_Measurement_Metric Response> 
- Provides a list of metrics that act as inputs into the objective function.
- stepCount String
- The number of steps a machine learning model has been trained for. Must be non-negative.
- elapsedTime string
- Time that the trial has been running at the point of this measurement.
- metrics
GoogleCloud Ml V1_Measurement_Metric Response[] 
- Provides a list of metrics that act as inputs into the objective function.
- stepCount 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[GoogleCloud 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.
- elapsedTime 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.
- stepCount String
- The number of steps a machine learning model has been trained for. Must be non-negative.
TrialState, TrialStateArgs    
- StateUnspecified 
- 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.
- TrialState State Unspecified 
- STATE_UNSPECIFIEDThe trial state is unspecified.
- TrialState Requested 
- REQUESTEDIndicates that a specific trial has been requested, but it has not yet been suggested by the service.
- TrialState Active 
- ACTIVEIndicates that the trial has been suggested.
- TrialState Completed 
- COMPLETEDIndicates that the trial is done, and either has a final_measurement set, or is marked as trial_infeasible.
- TrialState Stopping 
- STOPPINGIndicates that the trial should stop according to the service.
- StateUnspecified 
- 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.
- StateUnspecified 
- 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.