Closed andreufont closed 1 year ago
I modified the code in #8 to raise an error if you are trying to load the default emulator from file, and the settings do not match. This should be enough for now, but it would be good to fix at some point (or delete the load_default option).
Ok, I tried some time ago to used pre-trained models and the code broke. I could fix it, but as you point out it's not clear it makes sense in the Gadget simulations. It could be helpful if I found a GP confguration working better than NN on Nyx files
Let's leave it for now, I just wanted to add the issue in case someone find this problem
Now that we have a fully working NN emulator, I think the GP emulator should be kept in the lightest possible form, such that we can replicate the emulator from Pedersen2021 and Pedersen2023. Both emulators could be trained in a couple of seconds, so I think we can drop the option to load pre-trained GP emulators. Do you agree @lauracabayol ? Nothing urgent, and I can take care of this, but I wanted to clean old issues from the repo.
The option to write / read a trained GP emulator is no longer available, but this is fine since it takes a second.
The NN emulator can be write / read from file.
Right now there is the option to not train the emulator, and instead load the default hyperparameters from file (see
load_default
function ingp_emulator.py
).This would be useful if the training was slow, but lately it takes a second to train the emulator, and we never use it anymore. We could drop it entirely.
If we wanted to keep the option, it would be useful to update the file stored, since currently it assume an obsolete setting for the emulator (symmetric kernel, including also a linear term).