core.posterior_models.build_model.autocomplete_model_kwargs

core.posterior_models.build_model.autocomplete_model_kwargs(
    model_kwargs,
    data_sample,
)

Autocomplete the model kwargs from train_settings and data_sample from the dataloader:

  • set input dimension of embedding net to shape of data_sample[1]
  • set dimension of parameter space to len(data_sample[0])
  • set added_context flag of embedding net if required for gnpe proxies
  • set context dim of posterior model to output dim of embedding net + gnpe proxy dim

Parameters

Name Type Description Default
model_kwargs dict Model settings, which are modified in-place. required
data_sample list Sample from dataloader (e.g., wfd[0]) used for autocomplection. Should be of format [parameters, GW data, gnpe_proxies], where the last element is only there is GNPE proxies are required. required