Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specification for cosmopower network packaging #12

Open
itrharrison opened this issue Nov 29, 2022 · 0 comments
Open

Specification for cosmopower network packaging #12

itrharrison opened this issue Nov 29, 2022 · 0 comments

Comments

@itrharrison
Copy link
Contributor

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:

  • Enable replicability/reusability and distribution of networks
  • Ensure 'safe' use of networks (e.g. only within trained parameter ranges)
  • Allow for fallback to the code being emulated (e.g. by including the full list of settings used in the code during training).
  • Allow automated enhancement of the training set (e.g. with reinforcement learning)

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant