NNPDF / nnpdf

An open-source machine learning framework for global analyses of parton distributions.
https://docs.nnpdf.science/
GNU General Public License v3.0
30 stars 6 forks source link

Implement a quick way to query theory properties in vp2 #337

Closed Zaharid closed 5 years ago

Zaharid commented 6 years ago

The necessity of queering some theory parameters (such as alpha_s), without having to download the theory has come a few times. At the moment vp2 has

https://github.com/NNPDF/nnpdf/blob/5a4544c93cbb56d08dce7421ffc31e42878e18cd/validphys2/src/validphys/core.py#L542

which is fine if you already have the theory, but it is cumbersome otherwise. We should probably have something like loader.check_theoryinfo(number) or similar.

wilsonmr commented 6 years ago

I keep forgetting to look at this, shall take a look this week

wilsonmr commented 6 years ago

So the theory url just contains compressed archives of the theories.

Was the intention to replicate get_description() remotely method, like unpacking a theory to a temp remote location and using the theory db - which I guess has potential issues of leaving stuff on the server if the connection drops - or did you have something else in mind? For instance adding descriptors to the json file, which could be scheduled everytime a theory is modified. I'm not really sure what the smart thing to do here is

Zaharid commented 5 years ago

We have the theory db living in master. All we want is to have something of the form

def check_theoryinfo(self, id:int) -> dict
wilsonmr commented 5 years ago

right, so basically just porting the code form core?

wilsonmr commented 5 years ago

Ahhh I understand, in core it expects that the theory is already downloaded, so we just want to seperate the db part since it doesn't rely on having the theory.. This was what confused me yesterday