Class TrialComponent
java.lang.Object
com.azure.resourcemanager.machinelearning.models.TrialComponent
- All Implemented Interfaces:
com.azure.json.JsonSerializable<TrialComponent>
public final class TrialComponent
extends Object
implements com.azure.json.JsonSerializable<TrialComponent>
Trial component definition.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncodeId()Get the codeId property: ARM resource ID of the code asset.command()Get the command property: [Required] The command to execute on startup of the job.Get the distribution property: Distribution configuration of the job.Get the environmentId property: [Required] The ARM resource ID of the Environment specification for the job.Get the environmentVariables property: Environment variables included in the job.static TrialComponentfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of TrialComponent from the JsonReader.Get the resources property: Compute Resource configuration for the job.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withCodeId(String codeId) Set the codeId property: ARM resource ID of the code asset.withCommand(String command) Set the command property: [Required] The command to execute on startup of the job.withDistribution(DistributionConfiguration distribution) Set the distribution property: Distribution configuration of the job.withEnvironmentId(String environmentId) Set the environmentId property: [Required] The ARM resource ID of the Environment specification for the job.withEnvironmentVariables(Map<String, String> environmentVariables) Set the environmentVariables property: Environment variables included in the job.withResources(JobResourceConfiguration resources) Set the resources property: Compute Resource configuration for the job.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
TrialComponent
public TrialComponent()Creates an instance of TrialComponent class.
-
-
Method Details
-
codeId
Get the codeId property: ARM resource ID of the code asset.- Returns:
- the codeId value.
-
withCodeId
Set the codeId property: ARM resource ID of the code asset.- Parameters:
codeId- the codeId value to set.- Returns:
- the TrialComponent object itself.
-
command
Get the command property: [Required] The command to execute on startup of the job. eg. "python train.py".- Returns:
- the command value.
-
withCommand
Set the command property: [Required] The command to execute on startup of the job. eg. "python train.py".- Parameters:
command- the command value to set.- Returns:
- the TrialComponent object itself.
-
environmentId
Get the environmentId property: [Required] The ARM resource ID of the Environment specification for the job.- Returns:
- the environmentId value.
-
withEnvironmentId
Set the environmentId property: [Required] The ARM resource ID of the Environment specification for the job.- Parameters:
environmentId- the environmentId value to set.- Returns:
- the TrialComponent object itself.
-
environmentVariables
Get the environmentVariables property: Environment variables included in the job.- Returns:
- the environmentVariables value.
-
withEnvironmentVariables
Set the environmentVariables property: Environment variables included in the job.- Parameters:
environmentVariables- the environmentVariables value to set.- Returns:
- the TrialComponent object itself.
-
distribution
Get the distribution property: Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null.- Returns:
- the distribution value.
-
withDistribution
Set the distribution property: Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null.- Parameters:
distribution- the distribution value to set.- Returns:
- the TrialComponent object itself.
-
resources
Get the resources property: Compute Resource configuration for the job.- Returns:
- the resources value.
-
withResources
Set the resources property: Compute Resource configuration for the job.- Parameters:
resources- the resources value to set.- Returns:
- the TrialComponent object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<TrialComponent>- Throws:
IOException
-
fromJson
Reads an instance of TrialComponent from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of TrialComponent if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the TrialComponent.
-