Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(engine): allow scripts to register experiments #860

Merged
merged 88 commits into from
Aug 17, 2022
Merged

Conversation

bassosimone
Copy link
Contributor

@bassosimone bassosimone commented Aug 17, 2022

Checklist

Description

N/A

This mechanical refactoring moves model.Engine to the model
package. This changce is functional to subsequent changes to
more easily generate and maintain existing experiments.
Like the previous commit, here the idea is to move things around
in a mechanical fashion before working on more substantial changes.
Here the idea is that the logic for creating an experiment lives in
internal/registry along with a list of experiments.

In turn, this design will allow us soon to make it very easy to add a
new experiment, by making each experiment register itself.

However, before doing that, I need to refactor the code so that
each experiment and the engine can both import from registry.

    +---------------+                 +--------+
    | An experiment |                _| engine |
    +---------------+               | +--------+
              |                     |
              |                     |
              |      +----------+   |
              `----->| registry |<--.  imports
          imports    +----------+

Once the above is possible, then each experiment can register itself.
This design allows us to automatically add new experiments by
writing files in the proper package.
@bassosimone bassosimone marked this pull request as ready for review August 17, 2022 08:40
@bassosimone bassosimone requested a review from hellais as a code owner August 17, 2022 08:40
@bassosimone bassosimone merged commit 6a0ae5c into master Aug 17, 2022
@bassosimone bassosimone deleted the issue/2216 branch August 17, 2022 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant