-
Notifications
You must be signed in to change notification settings - Fork 3
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
Fix desimodel_sync script failure to update fp model #174
Conversation
Thanks Dustin. This looks good to me. I've also asked Ted to take a look. The regex change looks obvious and correct; I don't have any real sense for what kind of impact the unicode changes may have. |
Note that to use this, we'll have to:
|
Yeah, I don't think the unicode changes are actually required, just when I was running the code, in a bunch of places there was logging showing the old values (read from fp state files) were being interpreted as strings, while new data were being interpreted as byte arrays, so I just forced things to be strings upon reading. |
yes, it would be good to have Ted having a look. |
Hi folks. It would be good to get this into production. I tried applying just the regex fix, and if I compare the results of that run vs. this PR, I get the following differences: In the logging, it prints out:
and so on. To me, this looks like that without the bytes->strings changes, the code is receiving the data from the calib files as bytes, whereas it looks like the "existing" exclusions and timestamps are received as strings. On the other hand, when I check the resulting So my opinion is that these bytes->strings changes are good form, but not strictly required to get us back up and running again. cheers, |
Okay, this looks good to me. @sbailey , let's plan to tag this and install on the DESI cluster ~tomorrow? |
This is only a proposal to tag desimodel, not to make a new desiconda release, right? If so, we can upgrade the desiconda installation at KPNO (last updated in August 2023) to desiconda 2.2.0, and then upgrade the installation of desimodel to the new tag. |
Yes, sorry. No, we don't need a new desiconda. Yes, I think we only need a new tag. This |
The tag at KPNO is updated. For my own documentation, here were my steps (as
I then edited |
This turned out to be caused by an overly permissive regex in selecting the focalplane model files!
They wanted to allow yaml or json, optionally gzipped, so the regex is
r"^desi-exclusion_(.*)\.(?:yaml|json).*$")
…. BUT, the fp-sync script renames the previous exclusion file to something likedesi-exclusion_2024-08-20T04:34:57+00:00.json.gz.previous
…. which matches the regex!! And since the files are selected usingos.walk
, the one that matches the regex and appears last in the directory listing is the one chosen! So it was actually reading the previous exclusions list, which is why the updates weren’t working!I also made some string (unicode) rather than bytes changes to table formats.