baybe.surrogates.custom.register_custom_architecture

baybe.surrogates.custom.register_custom_architecture(joint_posterior_attr: bool = False, constant_target_catching: bool = True, batchify_posterior: bool = True)[source]

Wrap a given custom model architecture class into a `Surrogate`.

Parameters:
  • joint_posterior_attr (bool) – Boolean indicating if the model returns a posterior distribution jointly across candidates or on individual points.

  • constant_target_catching (bool) – Boolean indicating if the model cannot handle constant target values and needs the @catch_constant_targets decorator.

  • batchify_posterior (bool) – Boolean indicating if the model is incompatible with t- and q-batching and needs the @batchify decorator for its posterior.

Return type:

Callable

Returns:

A function that wraps around a model class based on the specifications.