Class EarlyTerminationPolicy

java.lang.Object
com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy
All Implemented Interfaces:
com.azure.json.JsonSerializable<EarlyTerminationPolicy>
Direct Known Subclasses:
BanditPolicy, MedianStoppingPolicy, TruncationSelectionPolicy

public class EarlyTerminationPolicy extends Object implements com.azure.json.JsonSerializable<EarlyTerminationPolicy>
Early termination policies enable canceling poor-performing runs before they complete.
  • Constructor Details

    • EarlyTerminationPolicy

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

    • policyType

      public EarlyTerminationPolicyType policyType()
      Get the policyType property: [Required] Name of policy configuration.
      Returns:
      the policyType value.
    • evaluationInterval

      public Integer evaluationInterval()
      Get the evaluationInterval property: Interval (number of runs) between policy evaluations.
      Returns:
      the evaluationInterval value.
    • withEvaluationInterval

      public EarlyTerminationPolicy withEvaluationInterval(Integer evaluationInterval)
      Set the evaluationInterval property: Interval (number of runs) between policy evaluations.
      Parameters:
      evaluationInterval - the evaluationInterval value to set.
      Returns:
      the EarlyTerminationPolicy object itself.
    • delayEvaluation

      public Integer delayEvaluation()
      Get the delayEvaluation property: Number of intervals by which to delay the first evaluation.
      Returns:
      the delayEvaluation value.
    • withDelayEvaluation

      public EarlyTerminationPolicy withDelayEvaluation(Integer delayEvaluation)
      Set the delayEvaluation property: Number of intervals by which to delay the first evaluation.
      Parameters:
      delayEvaluation - the delayEvaluation value to set.
      Returns:
      the EarlyTerminationPolicy 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<EarlyTerminationPolicy>
      Throws:
      IOException
    • fromJson

      public static EarlyTerminationPolicy fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of EarlyTerminationPolicy from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of EarlyTerminationPolicy if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the EarlyTerminationPolicy.