thoth.adviser.predictors package

Submodules

thoth.adviser.predictors.annealing module

Implementation of Adaptive Simulated Annealing (ASA) used to resolve software stacks.

class thoth.adviser.predictors.annealing.AdaptiveSimulatedAnnealing(*, keep_history=None, temperature_history: List[Tuple[float, bool, float, int]] = NOTHING, temperature: float = 0.0)[source]

Bases: thoth.adviser.predictor.Predictor

Implementation of adaptive simulated annealing looking for stacks based on the scoring function.

plot(output_file: Optional[str] = None) → matplotlib.figure.Figure[source]

Plot temperature history of adaptive simulated annealing.

pre_run(context: thoth.adviser.context.Context) → None[source]

Initialization before the actual annealing run.

run(context: thoth.adviser.context.Context, beam: thoth.adviser.beam.Beam) → thoth.adviser.state.State[source]

Run adaptive simulated annealing on top of beam.

thoth.adviser.predictors.hill_climbing module

Implementation of hill climbing in the state space.

class thoth.adviser.predictors.hill_climbing.HillClimbing(history: List[Tuple[float, int]] = NOTHING, *, keep_history=None)[source]

Bases: thoth.adviser.predictor.Predictor

Implementation of hill climbing in the state space.

plot(output_file: Optional[str] = None) → matplotlib.figure.Figure[source]

Plot score of the highest rated stack during hill climbing.

run(context: thoth.adviser.context.Context, beam: thoth.adviser.beam.Beam) → thoth.adviser.state.State[source]

Get top state from the beam for the next resolution round.

thoth.adviser.predictors.sampling module

Implementation of a random sampling of the state space.

class thoth.adviser.predictors.sampling.Sampling(history: List[Tuple[float, int]] = NOTHING, *, keep_history=None)[source]

Bases: thoth.adviser.predictor.Predictor

Implementation of a random sampling of the state space.

plot(output_file: Optional[str] = None) → matplotlib.figure.Figure[source]

Plot score of the highest rated stack during sampling.

run(context: thoth.adviser.context.Context, beam: thoth.adviser.beam.Beam) → thoth.adviser.state.State[source]

Get random state from the beam for the next resolution round.

Module contents

Implementation of predictors used with resolver..

class thoth.adviser.predictors.AdaptiveSimulatedAnnealing(*, keep_history=None, temperature_history: List[Tuple[float, bool, float, int]] = NOTHING, temperature: float = 0.0)[source]

Bases: thoth.adviser.predictor.Predictor

Implementation of adaptive simulated annealing looking for stacks based on the scoring function.

plot(output_file: Optional[str] = None) → matplotlib.figure.Figure[source]

Plot temperature history of adaptive simulated annealing.

pre_run(context: thoth.adviser.context.Context) → None[source]

Initialization before the actual annealing run.

run(context: thoth.adviser.context.Context, beam: thoth.adviser.beam.Beam) → thoth.adviser.state.State[source]

Run adaptive simulated annealing on top of beam.

class thoth.adviser.predictors.HillClimbing(history: List[Tuple[float, int]] = NOTHING, *, keep_history=None)[source]

Bases: thoth.adviser.predictor.Predictor

Implementation of hill climbing in the state space.

plot(output_file: Optional[str] = None) → matplotlib.figure.Figure[source]

Plot score of the highest rated stack during hill climbing.

run(context: thoth.adviser.context.Context, beam: thoth.adviser.beam.Beam) → thoth.adviser.state.State[source]

Get top state from the beam for the next resolution round.

class thoth.adviser.predictors.Sampling(history: List[Tuple[float, int]] = NOTHING, *, keep_history=None)[source]

Bases: thoth.adviser.predictor.Predictor

Implementation of a random sampling of the state space.

plot(output_file: Optional[str] = None) → matplotlib.figure.Figure[source]

Plot score of the highest rated stack during sampling.

run(context: thoth.adviser.context.Context, beam: thoth.adviser.beam.Beam) → thoth.adviser.state.State[source]

Get random state from the beam for the next resolution round.