Skip to content

[ENH] callbacks for BaseOptimizer or BaseExperiment #158

@fkiraly

Description

@fkiraly

It would be nice to have callbacks for BaseOptimizer or BaseExperiment.

One common use case is logging the sequence of parameters and parameter values obtained throughout the optimization.

My current thinking is, the best place to inject callbacks is the boilerplate layer of evaluate in BaseExperiment.

When called from within BaseOptimizer, it logs to a singleton or multiton attached to the optimizer instance, or to a logger attached to the optimizer.

How are callbacks passed? I can see a few options:

  • through set_config with a callback or callback_pre / callback_post field
  • as __init__ arguments, though that would require that all experiments and optimizers have to take it (which might be invasive)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions