-
Notifications
You must be signed in to change notification settings - Fork 21
feat: add functions to add multiple jobs at once #1487
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
base: master
Are you sure you want to change the base?
Conversation
|
Thank you! This looks good I just want to consider the interface for a few minutes. Specifically the verbs create commit_ make_ create_ ... Can we just add a commit=True option to create_job? And the check of existing should probably occur on commit rather than creation. |
Sure, so we just have |
|
Was borrowing some things from this for #1348 since trying to add all the jobs for each obs, wafer, and band up front took a while. I was testing some different approaches and was wondering if we could do this: instead of: The first one is significantly faster than the second one. Can do the check for existing before the |
|
I like that a lot, let me run some tests and then update the PR. |
|
Hmm having the Also just watching the file seems like things arent really writing, I'll dig into this a bit more. |
|
Hmm interesting. This is the full version of your commit function that I edited that seems to be working for me just in case it helps (the existence check may need improvement). I load back the jobdb made using this and it looks fully populated. |
|
It was the missing |
|
On the existence check, I found that calling |
|
Yeah I found the same thing, in my usecase I produce a dict of jobs upfront and use that to check existence in the loop (https://github.com/simonsobs/LATR_Validation/blob/main/pipelines/lat_beams/lat_beams/utils.py#L187). The problem I have with Some solutions to that are:
I personally think 3 or 4 is the way to go for now, with 1 or 2 as a possibility for a future PR depending on how the user base expands. If we go with 3 or 4 then we should probably drop an example of checking existence ahead of time in the docs. |
|
Yeah I also think 3 sounds like the best solution probably. |
|
Great. @mhasself thoughts before this is ready to merge? |
mmccrackan
left a comment
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.
Closes #1483