alessiospuriomancini / cosmopower

Machine Learning - accelerated Bayesian inference
https://alessiospuriomancini.github.io/cosmopower
GNU General Public License v3.0
58 stars 26 forks source link

Specification for cosmopower network packaging #12

Closed itrharrison closed 3 months ago

itrharrison commented 1 year ago

From a discussion with @alessiospuriomancini and @htjense, we came up with a proposal for a specification for a yaml file which packages a cosmopower network.

The aims are for this packaging to:

Note that the aim for this is to be flexible enough to work for things other than Boltzmann codes, and (I think) the interface with inference codes such as cobaya and cosmosis should be managed within those packages.

A fuzzy proposal for this specification is here (inspired by the one for camb from @htjense attached):

network_name: 

emulated_code:
  name:
  version:

samples:
  N_training: 

  xmin:
  xmax:
  xbinning:

  extra_args:
    {non-default arguments that were used in the emulated code}

  full_args_file: {file containing the full arguments used in the emulated code}

networks:
  {observable_name}:
    type: NN
    log: True
    n_traits:
      n_hidden: [ ]
    training:
      validation_split: 
      learning_rates: [  ]
      batch_sizes: [ ]
      gradient_accumulation_steps: [ ]
      patience_values: [ ]
      max_epochs: [ ]

sampled_parameters:
  {par1}: [ ,  ]
  {par2}: "lambda par1: 1e-10 * np.exp(par1)"

  drop: [ par1 ]

derived: [  ]

lcdm.yaml.txt

alessiospuriomancini commented 3 months ago

closing this and linking it to #28