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 Summary
ConstructorsConstructorDescriptionCreates an instance of EarlyTerminationPolicy class. -
Method Summary
Modifier and TypeMethodDescriptionGet the delayEvaluation property: Number of intervals by which to delay the first evaluation.Get the evaluationInterval property: Interval (number of runs) between policy evaluations.static EarlyTerminationPolicyfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of EarlyTerminationPolicy from the JsonReader.Get the policyType property: [Required] Name of policy configuration.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withDelayEvaluation(Integer delayEvaluation) Set the delayEvaluation property: Number of intervals by which to delay the first evaluation.withEvaluationInterval(Integer evaluationInterval) Set the evaluationInterval property: Interval (number of runs) between policy evaluations.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
-
EarlyTerminationPolicy
public EarlyTerminationPolicy()Creates an instance of EarlyTerminationPolicy class.
-
-
Method Details
-
policyType
Get the policyType property: [Required] Name of policy configuration.- Returns:
- the policyType value.
-
evaluationInterval
Get the evaluationInterval property: Interval (number of runs) between policy evaluations.- Returns:
- the evaluationInterval value.
-
withEvaluationInterval
Set the evaluationInterval property: Interval (number of runs) between policy evaluations.- Parameters:
evaluationInterval- the evaluationInterval value to set.- Returns:
- the EarlyTerminationPolicy object itself.
-
delayEvaluation
Get the delayEvaluation property: Number of intervals by which to delay the first evaluation.- Returns:
- the delayEvaluation value.
-
withDelayEvaluation
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
- Specified by:
toJsonin interfacecom.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.
-