ei de
Two common parameters for configuring an Early Termination Policy
evaluation_interval - How many trials per evaluation ie 1 means eval on every trialdelay_evaluation - How many completed trials to wait before we start evaluating for ET policy (allows training a few Models in order to get some performance numbers)BP MSP TSP
Three policies for configuring an Early Termination Policy
Bandit Policy
- Explain slack_factor vs slack_amount
- Explain lower vs higher factors
Stop a trial if the target performance metric underperforms the best trial so far by a specified margin, defined by either a slack_factor or a slack_amount
slack_amount: the next score underperforms by this specific amountslack_factor: the next score underperforms by (highest / (1+slack_factor)). ex. if slack_factor = 0.1 and highest = 1.0 then ET happens when the next trial score is less than (1/1.1) = 0.91Explain Bandit Policy code:
from azure.ai.ml.sweep import BanditPolicy
sweepjob.early_termination = BanditPolicy(
slack_amount = 0.2,
delay_evaluation = 5,
evaluation_interval = 1
)Median Stopping Policy
Stop a trial if the target performance metric is worse than the median or average of all trials
Explain Median Stopping Policy code:
from azure.ai.ml.sweep import MedianStoppingPolicy
sweepjob.early_termination = MedianStoppingPolicy(
delay_evaluation = 5,
evaluation_interval = 1
)Truncation Selection Policy
Cancel the lowest performing % of trials at each evaluation interval based on the truncation_percentage parameter
Explain Truncation Selection Policy code:
from azure.ai.ml.sweep import TruncationSelectionPolicy
sweepjob.early_termination = TruncationSelectionPolicy(
delay_evaluation = 5,
truncation_percentage = 20,
evaluation_interval = 1
)