-
Notifications
You must be signed in to change notification settings - Fork 101
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
[Feature Request] Single Command for Caching Remote Files for Runs on Machines with No Access to the Internet #1372
Comments
This should accept as options a list of telescopes, or perhaps have a default list. |
I think it will be good to download new files (including metadata) only if it is necessary. In principle, we can just look at the latest TOA value and decide if the local files are sufficient. |
https://nanograv-pint.readthedocs.io/en/latest/_autosummary/pint.observatory.topo_obs.export_all_clock_files.html#pint.observatory.topo_obs.export_all_clock_files does this if you have loaded in data pertaining to the relevant observatories. So this could be run as the last step in the timing analysis. But it should also be possible to pre-load various observatories. |
Note that this also doesn't deal explicitly with whatever files astropy uses on it's own. that is discussed at https://docs.astropy.org/en/stable/utils/data.html#astropy-data-and-clusters: do you need something to do that as well? |
I think for Joe's application the easiest thing to do is just export all the telescope clock corrections PINT knows about. |
The clock corrections code does this. You only get new clock corrections if you have a TOA past the end of the ones you currently have - or if the repository has flagged your current version of a clock correction file as needing updates (presumably because it contained errors). |
To make this happen, I think we need:
Then someone setting up a cluster would call the single command to preload the cache, and then set the "never check the internet" flag on the nodes. |
The way to check this works is to use Issues that will arise:
|
For completeness, this is an example of the type of things that need to be pulled down during an import:
My astropy cache looks like this:
|
The IERS_Auto table in recent versions of Astropy seems to only update if you have new data: https://github.com/astropy/astropy/blob/11b3214f18b74aea5e3f8349e50ae1b09c39d30e/astropy/utils/iers/iers.py#L756 |
Hey All,
As I said in last week's call, we should work towards adding a command that grabs the necessary files that normally it would attempt to grab from the web, and instead caches them locally. This would allow PINT to be used on compute nodes which usually have no outside access to the Internet.
Right now, I get around this by running
python -c "import pint.toa"
and that will nab some files from astropy and cache them for ~ a week.It would also be nice to force PINT to tell astropy to use old cached files if the user requires it -or- if there is no internet connection, instead of killing the script.
~ Joe G.
The text was updated successfully, but these errors were encountered: