culebra.trainer.aco.ACOFSConvergenceDetector class

class ACOFSConvergenceDetector(convergence_check_freq: int | None = None)

Bases: Base

Create a convergence detector.

Parameters:

convergence_check_freq (int) – Convergence assessment frequency. If omitted, DEFAULT_CONVERGENCE_CHECK_FREQ will be used. Defaults to None

Methods

ACOFSConvergenceDetector.has_converged(trainer) bool

Detect if the trainer has converged.

Parameters:

trainer (ACOFS) – The trainer

Returns:

True if the trainer has converged

Return type:

bool

Private methods

ACOFSConvergenceDetector._get_repr_properties() dict[str, object]

Return the subset of properties used for __repr__.

Filters and evaluates all class-level @property attributes, returning only those intended for representation purposes. Private properties (names starting with _) are excluded.

Returns:

Mapping of property names to their corresponding values.

Return type:

dict[str, object]