-
Notifications
You must be signed in to change notification settings - Fork 24
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
Add UPDATED timestamp column #2373
Conversation
We have used desi_tsnr_afterburner in MPI mode in the past, but that didn't scale up to current production sizes due to limitations of how the MPI path was implemented (needing to recalculate things that aren't recalculated in the multiprocessing path). For Kibo we used multiprocessing with one job per night, then combined them afterward. Daily mode also uses multiprocessing, not MPI. i.e. I don't think we are actively using the MPI option now (but as part of a future refactor, I would like to re-enable an MPI option with better scaling).
Smells like a leftover from iterative code development. i.e. I don't see a specific reason for that (e.g. a modification of the originally parsed list of nights/expids, requiring an re-parsing of the original args). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conceptually this seems fine, though I haven't done any operational testing of it myself. @akremin could you help with that to make sure it works as expected for daily ops?
@weaverba137 does this require the patched exposures and tiles files to be in place with the pre-added UPDATED column before this can be used, or will it add that UPDATED column to the current files if we merge this before signing off on the patched files? i.e. what is the order of operations for deployment (which might also be relevant for @akremin testing)?
That would be my preference. It would increase code complexity if we had to assume |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Ben, the changes look good. I agree with the above comments that we'll want to coordinate things such that we put the updated tables in place before we try to run this with the merged code.
One question I have is whether we also want to have this column in the exposures file? Maybe I misread the code, but it seems like the UPDATED
is only added for the tiles completeness that feeds into the tiles file.
When the That brings up another open question. As I mention in #2335, |
Okay, if we don't need it, that is fine. We can always add a column in the future if we decided we like having it. There is no major reason why we don't write a On a more practical side, the tiles code only writes one format at a time, so we have to run the code twice to produce the files for e.g. Kibo. However, I'm sure that would be an easy modification to the code to make it write both simultaneously. |
Right, I mentioned that in #2335, and yes it would be easy to fix But since you mention it, there's actually a "feature" in |
I am fine with having the code always write both. I agree that it should either always write both or it should only write what is requested. The behavior or writing both under one circumstance but only one under another circumstance should be removed. |
I've modified the code so that both files are always written out. |
@sbailey @akremin, in preparation for (hopefully) merging this soon, I think we agreed to punt these open questions to a future refactor of
So I think the only thing left is to run operational tests after patching the daily tiles and exposures files. |
With the latest push the code now works and I see updates for the night I tested. Test: The updated table had the same "UPDATED" date for all nights except those on the night requested, which were updated to the time I ran it. Two entries from 20240928 in the new file and the pre-updated file. They are different time stamps, which is good:
Two entries from 20240927 in the new file and the pre-updated file. They are the same, which is good:
|
This PR:
desispec.tilecompleteness.merge_tile_completeness_table()
to add anUPDATED
column for database use.compute_tile_completeness_table
. In one scenario, delayed GFA processing can result in updates to the tiles file, even if a night was not included in--nights $NIGHT
.desi_tsnr_afterburner
.Open questions:
one_night()
tomain()
when running in MPI mode. Isdesi_tsnr_afterburner
ever run in MPI mode?args.expids
andargs.nights
parsed more than once?Some operational testing should be performed before merging this PR.