Skip to content

Plan for Optimas generator standardization #269

@shuds13

Description

@shuds13

Plan to support the generator standard in Optimas.

Step 1: Implement suggest/ingest (standardization PR).

  • Attempt to make optimas generators compatible with generator standard #249
  • Get current tests working with a provisional solution to the IDs.
  • For Optimus generators:
    • Constructor is provided Optimus data structures. --- (How does this work with the multitask example?).
  • For external (standardized) generators (e.g., libEnsemble):
    • ExternalGenerator provides Optimus data structures alongside the standardized generator.
  • If a previous history is provided, still as a libEnsemble numpy file.
  • Note: This stage does not require API change for Optimas (suggest/ingest are internal).

Step 2: Review approach to ID.

  • see Attempt to make optimas generators compatible with generator standard #249 (comment)
  • Do we need to maintain Optimas and Generator IDs or can they be combined into one.
  • Does a generator in the standard need to be declared as one that manages IDs.
    • e.g., if you give it a history (or any unexpected points) are you expecting to give it IDs that it will use internally, so that when it generates new points it will enumerate from that point.
    • Most examples, do not give id to gen - but what about when using an Ax generator...
  • Can we assume a single generator that will take charge of IDs (when using _id)
  • Check consistent with unexpected points (previous history, ignored points etc).
  • Note that in multitask ax id is shared for a set of points with each having an arm_name.

Step 3: Implement VOCS

  • Summary. PR Implement VOCS interface #281 implements the vocs interface using conversions to Optimas internal parameters. This means external generators are still run through the ExternalGenerator wrapper so these internals get set. Optionally, a future pass could update the internals.
  • Update Optimas generators to use VOCS constructors.
  • In some cases a mapping might need to be given (e.g. variables to varying_parameters/trial_parameters).
  • Or if these are always accessed through generators, do we remove the parameter structures and use the standard internally.
  • How to handle trial features like ignored, status
  • Can we lift more functions dealing with Optimas data structures outside of generators (e.g., incorporate_history)
  • Or will Optimas data structures still be used inside the generators? - use internal bypass in Optimas?
  • How to set Optimas data structures
    • from VOCS - from initialized gen)
    • In config step, by use of a wrapper (like ExternalGenerator) or in Exploration.
    • Note that in Exploration constructor it is assumed that Optimas data structures are set up (e.g., loading history of points).

Step 4: Check edge cases and details

  • Ensure suggest correctly deals with case where num_points is not supplied, for each gen (gen decides).
  • Handle MAXIMIZE / MINIMIZE / EXPLORE
  • If suggest cannot return the number of points asked for - is correct error raised.

Ref:
Optimas data structures: e.g., varying_parameters, objectives, dedicated_resources, custom_trial_parameters
These are initialized with the generator and referenced through the generator throughout Optimas. They are also used in trial.

Optimas Exploration data structures:
The trial data structure is an Optimas data structure - where a list of trials are managed in persistent_generator with a unique trial.index. Each trial was generally created inside ask (now suggest) with more info filled in outside the gen (trial.index). It was also given to tell (now ingest). With the new standard the internal code in ingest to some extent can be retained by duplicating the structures internally, however, the elements can no longer be updated in place (as happens in some places (status / ignored). See the multitask generator as an example. Alternatively, the generators internal code could be re-written to no longer use these structures. It's also important not to confuse these trials with Ax trials which are also used inside the generators. Do we want these generators to be able to exist independently of Optimas (can they rely on importing Optimus data structures).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions