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

Use valid example code in the README.md #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dcambie
Copy link

@dcambie dcambie commented Sep 19, 2022

The following problems were presente with the original example:

  • syntax error on config dict creation
  • append was called on the observations list, but the params is also a list, making it a nested list and giving a TypeError (list indices must be integers or slices, not str) in observation_processor.py
  • unclear statement import experiment. It is not immediately evident that experiment is supposed to be a local module implementing a run function that takes a list of 2 dictionaries (!) with experimental parameters and returns a merit function.
  • There should be 1 merit function result per set of parameters, not per batch. Also params is a list so params['obj'] = merit should be at least params[0]['obj'] = merit1; params[1]['obj'] = merit2.
  • variable named 'iter' shadowing global scope (ok, this is not important ;)
  • ITER_BUDGET unset

The following problems were presente with the original example:
* syntax error on config dict creation
* append was called on the observations list, but the params is also a list, making it a nested list and giving a `TypeError` (list indices must be integers or slices, not str) in observation_processor.py
* unclear statement `import experiment`. It is not immediately evident that experiment is supposed to be a local module implementing a `run` function that takes a list of 2 dictionaries (!) with experimental parameters and returns a merit function.
* There should be 1 merit function result per set of parameters, not per batch. Also params is a list so `params['obj'] = merit` should be at least `params[0]['obj'] = merit1; params[1]['obj'] = merit2`.
* variable named 'iter' shadowing global scope (ok, this is not important ;)
* ITER_BUDGET unset
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