metaheuristic_designer.reporters package¶
Submodules¶
metaheuristic_designer.reporters.create_reporter module¶
Factory function for reporter objects.
- create_reporter(reporter_name: str, **kwargs) Reporter[source]¶
Instantiate a reporter by name.
- Parameters:
reporter_name (str) – One of
"silent","tqdm", or"verbose".**kwargs – Forwarded to the reporter constructor.
- Returns:
A concrete reporter instance.
- Return type:
- Raises:
ValueError – If reporter_name is not recognised.
metaheuristic_designer.reporters.silent_reporter module¶
Silent reporter that produces no output during a run.
- class SilentReporter[source]¶
Bases:
ReporterReporter that produces no output.
All logging methods are no-ops. Useful for running experiments without visual clutter.
- log_init(algorithm: Algorithm)[source]¶
Called once, before the main optimisation loop starts.
- Parameters:
algorithm (Algorithm) – The algorithm that is about to run.
metaheuristic_designer.reporters.tqdm_reporter module¶
Reporter that shows a tqdm progress bar during optimisation.
- class TQDMReporter(resolution: int = 1000, **kwargs)[source]¶
Bases:
ReporterReporter that displays a tqdm progress bar.
- Parameters:
resolution (int, optional) – Number of ticks in the progress bar (default 1000). Higher values give smoother updates.
metaheuristic_designer.reporters.verbose_reporter module¶
Reporter that prints a text summary at regular intervals.
Module contents¶
Built-in reporter implementations (silent, tqdm, verbose) and the factory.
- create_reporter(reporter_name: str, **kwargs) Reporter[source]¶
Instantiate a reporter by name.
- Parameters:
reporter_name (str) – One of
"silent","tqdm", or"verbose".**kwargs – Forwarded to the reporter constructor.
- Returns:
A concrete reporter instance.
- Return type:
- Raises:
ValueError – If reporter_name is not recognised.
- class SilentReporter[source]¶
Bases:
ReporterReporter that produces no output.
All logging methods are no-ops. Useful for running experiments without visual clutter.
- log_init(algorithm: Algorithm)[source]¶
Called once, before the main optimisation loop starts.
- Parameters:
algorithm (Algorithm) – The algorithm that is about to run.
- class TQDMReporter(resolution: int = 1000, **kwargs)[source]¶
Bases:
ReporterReporter that displays a tqdm progress bar.
- Parameters:
resolution (int, optional) – Number of ticks in the progress bar (default 1000). Higher values give smoother updates.