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 Details

    • TrialComponent

      public TrialComponent()
      Creates an instance of TrialComponent class.
  • Method Details

    • codeId

      public String codeId()
      Get the codeId property: ARM resource ID of the code asset.
      Returns:
      the codeId value.
    • withCodeId

      public TrialComponent withCodeId(String codeId)
      Set the codeId property: ARM resource ID of the code asset.
      Parameters:
      codeId - the codeId value to set.
      Returns:
      the TrialComponent object itself.
    • command

      public String command()
      Get the command property: [Required] The command to execute on startup of the job. eg. "python train.py".
      Returns:
      the command value.
    • withCommand

      public TrialComponent withCommand(String command)
      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

      public String environmentId()
      Get the environmentId property: [Required] The ARM resource ID of the Environment specification for the job.
      Returns:
      the environmentId value.
    • withEnvironmentId

      public TrialComponent withEnvironmentId(String environmentId)
      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

      public Map<String,String> environmentVariables()
      Get the environmentVariables property: Environment variables included in the job.
      Returns:
      the environmentVariables value.
    • withEnvironmentVariables

      public TrialComponent withEnvironmentVariables(Map<String,String> environmentVariables)
      Set the environmentVariables property: Environment variables included in the job.
      Parameters:
      environmentVariables - the environmentVariables value to set.
      Returns:
      the TrialComponent object itself.
    • distribution

      public DistributionConfiguration 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

      public TrialComponent withDistribution(DistributionConfiguration distribution)
      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

      public JobResourceConfiguration resources()
      Get the resources property: Compute Resource configuration for the job.
      Returns:
      the resources value.
    • withResources

      public TrialComponent withResources(JobResourceConfiguration resources)
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<TrialComponent>
      Throws:
      IOException
    • fromJson

      public static TrialComponent fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.