tune.iterative
tune.iterative.asha
- class ASHAJudge(schedule, always_checkpoint=False, study_early_stop=None, trial_early_stop=None, monitor=None)[source]
Bases:
tune.concepts.flow.judge.TrialJudge
- Parameters
schedule (List[Tuple[float, int]]) –
always_checkpoint (bool) –
study_early_stop (Optional[Callable[[List[Any], List[tune.iterative.asha.RungHeap]], bool]]) –
trial_early_stop (Optional[Callable[[tune.concepts.flow.report.TrialReport, List[tune.concepts.flow.report.TrialReport], List[tune.iterative.asha.RungHeap]], bool]]) –
monitor (Optional[tune.concepts.flow.judge.Monitor]) –
- property always_checkpoint: bool
- can_accept(trial)[source]
- Parameters
trial (tune.concepts.flow.trial.Trial) –
- Return type
bool
- get_budget(trial, rung)[source]
- Parameters
trial (tune.concepts.flow.trial.Trial) –
rung (int) –
- Return type
float
- judge(report)[source]
- Parameters
report (tune.concepts.flow.report.TrialReport) –
- Return type
- property schedule: List[Tuple[float, int]]
- class RungHeap(n)[source]
Bases:
object
- Parameters
n (int) –
- property best: float
- property bests: List[float]
- property capacity: int
- property full: bool
- push(report)[source]
- Parameters
report (tune.concepts.flow.report.TrialReport) –
- Return type
bool
- values()[source]
- Return type
Iterable[tune.concepts.flow.report.TrialReport]
tune.iterative.objective
- class IterativeObjectiveFunc[source]
Bases:
object
- property current_trial: tune.concepts.flow.trial.Trial
- load_checkpoint(fs)[source]
- Parameters
fs (fs.base.FS) –
- Return type
None
- run(trial, judge, checkpoint_basedir_fs)[source]
- Parameters
trial (tune.concepts.flow.trial.Trial) –
judge (tune.concepts.flow.judge.TrialJudge) –
checkpoint_basedir_fs (fs.base.FS) –
- Return type
None
- property rung: int
- save_checkpoint(fs)[source]
- Parameters
fs (fs.base.FS) –
- Return type
None
- validate_iterative_objective(func, trial, budgets, validator, continuous=False, checkpoint_path='', monitor=None)[source]
- Parameters
trial (tune.concepts.flow.trial.Trial) –
budgets (List[float]) –
validator (Callable[[List[tune.concepts.flow.report.TrialReport]], None]) –
continuous (bool) –
checkpoint_path (str) –
monitor (Optional[tune.concepts.flow.judge.Monitor]) –
- Return type
None
tune.iterative.sha
tune.iterative.study
- class IterativeStudy(objective, checkpoint_path)[source]
Bases:
object
- Parameters
objective (tune.iterative.objective.IterativeObjectiveFunc) –
checkpoint_path (str) –
- optimize(dataset, judge)[source]
- Parameters
dataset (tune.concepts.dataset.TuneDataset) –
judge (tune.concepts.flow.judge.TrialJudge) –
- Return type