nuclear-multimessenger-astronomy / nmma

A pythonic library for probing nuclear physics and cosmology with multimessenger analysis
https://nuclear-multimessenger-astronomy.github.io/nmma/
GNU General Public License v3.0
33 stars 58 forks source link

Caching and test for GP #224

Closed sahiljhawar closed 1 year ago

sahiljhawar commented 1 year ago

This PR implements the use of caching to save the SVD models as cache and use them for all the future runs without the need to download models everytime. Fetching models from Zenodo is really slow, so for now the svdmodel.tar is hosted on Potsdam server. Following this, the analysis test has been updated to perform test on Bu2019lm since it makes use of the model. Also, note that if the tests are being used as is, do not use or create (from a code) any local folder by the name svdmodels as this can cause problems.

Note for admins: I would advise you to clear all the caches of this repo in order to have a fresh start.

sahiljhawar commented 1 year ago

Don't merge, injection test is failing randomly.

sahiljhawar commented 1 year ago

Removed GRB model from injections.py test. Also, need to check the availability of caches from main branch to feature branch.

sahiljhawar commented 1 year ago

Cache present on the main branch cannot be accessed by the feature branches. This means, whenever PR comes, new caches are added to the repo alongside the cache of the main branch. Commit 5b374d4 adds a post PR merge (and closed) cache deletion workflow.

sahiljhawar commented 1 year ago

@mcoughlin This can be merged now. Tests are passing. Cache workflow will be in action after the merge. In another PR I will pin parameters for GRB.