-
Notifications
You must be signed in to change notification settings - Fork 33
Description
What problem does this address?
As I understand it, default experiments are registered (an instance of each experiment) in an Experiment_Registry here (the experiments that have been registered can be inspected via the _ai_experiments_register_experiments hook)
However, just registering an experiment does not launch it. Experiments need to be "initialized", which happens here. After checking if the experiment is enabled, the experiment is actually executed by calling the register method of each experiment.
This is confusing because:
- There is a registration phase (adding experiments to the registry, discoverability, etc.).
- There is an initialization/launch phase (running the experiment’s logic once it’s enabled).
Using the name register for the method that initializes/launches the experiment blurs the distinction between these two phases and makes it harder to quickly understand the lifecycle of an experiment when reading the code.
What is your proposed solution?
Rename the method that actually starts/initializes an experiment from register() to a name that more clearly represents its role in the experiment lifecycle, such as:
init()initialize()launch()- or similar terminology that conveys “run/boot the experiment”.
This would:
- Make the lifecycle clearer:
- Register experiment → added to the
Experiment_Registry. - Initialize/launch experiment → logic is executed when enabled.
- Register experiment → added to the
- Reduce confusion for contributors and integrators trying to understand when an experiment is merely known to the system versus when it is actively running.
- Improve readability and self-documentation of the code around the
Experiment_Loaderand experiment classes.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status