igmhub / LaCE

Emulator for the one-dimensional Lyman-alpha flux power spectrum. It was used to generate the results shown in https://arxiv.org/abs/2011.15127, https://arxiv.org/abs/2209.09895, and https://arxiv.org/abs/2305.19064.
1 stars 3 forks source link

Nn emulator v2 #12

Closed lauracabayol closed 1 year ago

lauracabayol commented 1 year ago

New clean branch including the files with the NN emulator and the changes to the GP emulator and p1d archive

andreufont commented 1 year ago

I noticed that in order to import the flexible emulator (the one that can work as NN and as GP), you need to have torch installed, even if you decide to use GP only via that emulator. I guess this is not too surprising, but we could probably have a try / if statement when importing the nn emulator, and set a flag "no_torch" when importing that module fails.

I will now try to install torch, if it is easy then we can ignore the point above and just force every user to also install torch (since we believe that the NN version will eventually be the only relevant one).

andreufont commented 1 year ago

I noticed in the notebook you had to add by hand in the first cell environmental variables pointing to your local copy of the github repo. You shouldn't need to do this, I can run the notebook without that. It might be because you are running things at PIC through jupyterhub, but even then there is a way to pass all the relevant information in the pykernel (or however it is called).

Not a big deal for now (I can just delete these lines locally when I run the notebook), but good to figure this out in the long term.