QDpy
Loading...
Searching...
No Matches
base.py File Reference

Ask/tell protocols, evaluation scheduling, callbacks, and algorithm composition. More...

Go to the source code of this file.

Classes

class  qdpy.algorithms.base._InvalidEvaluation
class  qdpy.algorithms.base._CallbacksManager
class  qdpy.algorithms.base.QDAlgorithmLike
class  qdpy.algorithms.base.QDAlgorithm
class  qdpy.algorithms.base.Lambda
class  qdpy.algorithms.base.AlgWithBatchSuggestions
class  qdpy.algorithms.base.AlgWrapper
class  qdpy.algorithms.base.AlternatingAlgWrapper
class  qdpy.algorithms.base.SqAlgWrapper
class  qdpy.algorithms.base.Sq
class  qdpy.algorithms.base.FromArchive

Namespaces

namespace  qdpy

Functions

 qdpy.algorithms.base._positional_feedback_sizes (tell)
Tuple[int, float, Any, Any] qdpy.algorithms.base._evalWrapper (int eval_id, Callable fn, *args, **kwargs)
 Return a scheduler result even when an evaluator raises.
Tuple[int, float, Any, Any] qdpy.algorithms.base._severalEvalsWrapper (int eval_id, Callable fn, *args, **kwargs)

Detailed Description

Ask/tell protocols, evaluation scheduling, callbacks, and algorithm composition.

Definition in file base.py.

Function Documentation

◆ _evalWrapper()

Tuple[int, float, Any, Any] qdpy.algorithms.base._evalWrapper ( int eval_id,
Callable fn,
* args,
** kwargs )
protected

Return a scheduler result even when an evaluator raises.

The dispatch ID binds the response to its candidate. A captured error reaches the scheduler as data so its consumed budget is accounted for alongside successful calls.

Wrapper around an evaluation function. It catches any exceptions raised by the evaluation function (as exceptions might be lost depending on which kind of parallelism scheme is applied to launch evaluations). It also measures the time elapsed by the evaluation function computation.

Definition at line 106 of file base.py.

◆ _positional_feedback_sizes()

qdpy.algorithms.base._positional_feedback_sizes ( tell)
protected
Keep positional feedback for overrides that already accept it.

A declared keyword-only measurement takes precedence over ``*args``.
Check pairs and triples separately since ``scores`` can be keyword-only
even when fitness and features accept either call form.

Definition at line 58 of file base.py.

◆ _severalEvalsWrapper()

Tuple[int, float, Any, Any] qdpy.algorithms.base._severalEvalsWrapper ( int eval_id,
Callable fn,
* args,
** kwargs )
protected
Wrapper around several evaluations of an objective function. It catches any exceptions raised by the evaluation function (as exceptions might be lost depending on which kind of parallelism scheme is applied to launch evaluations). It also measures the time elapsed by the evaluation function computation.

Definition at line 123 of file base.py.