campa-consortium / generator_standard

Standardization for generators used in optimas, Xopt, libEnsemble...
5 stars 3 forks source link

Constructor arguments #3

Open roussel-ryan opened 5 months ago

roussel-ryan commented 5 months ago

Aside from generator specific keyword arguments I believe that there should be a simple standard set for specifying an input space (at least) as every generator (even random generators) need to know this information. This comes with the potential need to define if the input space is discrete or continuous.

For example: Xopt currently handles only continuous spaces specified by a dictionary of lists that specify the minimum and maximum of the bounds for each variable. This information is contained in a more complex object known as VOCS https://github.com/ChristopherMayes/Xopt/blob/main/xopt/vocs.py which also defines objectives/constraints/constants/observables and does validation on inputs. An example of this (taken from https://github.com/ChristopherMayes/Xopt/blob/main/docs/examples/single_objective_bayes_opt/bo_tutorial.ipynb) is below:

vocs = VOCS(
    variables={"x": [0, 2 * math.pi]},
    objectives={"f": "MINIMIZE"},
)
jlnav commented 5 months ago

upper_bound and lower_bound could be standards, if not for discrete spaces.

batch_size as we've discussed seems very useful, in the event that the user asks for the same num_points every time.

maybe past_points or history, in case a generator needs to build a model from past results before it can be askd? Though maybe that data can just be passed in via tell.

shuds13 commented 4 months ago

If we choose a structure that keeps variable information together like this it may be more extendible/flexible to make each variable its own object.

Also, do we want to support multi-dimensional variables?