Class TruncationSelectionPolicy
java.lang.Object
com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy
com.azure.resourcemanager.machinelearning.models.TruncationSelectionPolicy
- All Implemented Interfaces:
com.azure.json.JsonSerializable<EarlyTerminationPolicy>
Defines an early termination policy that cancels a given percentage of runs at each evaluation interval.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of TruncationSelectionPolicy class. -
Method Summary
Modifier and TypeMethodDescriptionstatic TruncationSelectionPolicyfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of TruncationSelectionPolicy from the JsonReader.Get the policyType property: [Required] Name of policy configuration.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Get the truncationPercentage property: The percentage of runs to cancel at each evaluation interval.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.withTruncationPercentage(Integer truncationPercentage) Set the truncationPercentage property: The percentage of runs to cancel at each evaluation interval.Methods inherited from class com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy
delayEvaluation, evaluationIntervalMethods 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
-
TruncationSelectionPolicy
public TruncationSelectionPolicy()Creates an instance of TruncationSelectionPolicy class.
-
-
Method Details
-
policyType
Get the policyType property: [Required] Name of policy configuration.- Overrides:
policyTypein classEarlyTerminationPolicy- Returns:
- the policyType value.
-
truncationPercentage
Get the truncationPercentage property: The percentage of runs to cancel at each evaluation interval.- Returns:
- the truncationPercentage value.
-
withTruncationPercentage
Set the truncationPercentage property: The percentage of runs to cancel at each evaluation interval.- Parameters:
truncationPercentage- the truncationPercentage value to set.- Returns:
- the TruncationSelectionPolicy object itself.
-
withEvaluationInterval
Set the evaluationInterval property: Interval (number of runs) between policy evaluations.- Overrides:
withEvaluationIntervalin classEarlyTerminationPolicy- Parameters:
evaluationInterval- the evaluationInterval value to set.- Returns:
- the EarlyTerminationPolicy object itself.
-
withDelayEvaluation
Set the delayEvaluation property: Number of intervals by which to delay the first evaluation.- Overrides:
withDelayEvaluationin classEarlyTerminationPolicy- Parameters:
delayEvaluation- the delayEvaluation value to set.- Returns:
- the EarlyTerminationPolicy object itself.
-
validate
public void validate()Validates the instance.- Overrides:
validatein classEarlyTerminationPolicy- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<EarlyTerminationPolicy>- Overrides:
toJsonin classEarlyTerminationPolicy- Throws:
IOException
-
fromJson
public static TruncationSelectionPolicy fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of TruncationSelectionPolicy from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of TruncationSelectionPolicy 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 TruncationSelectionPolicy.
-