Skip to content
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

DM-43060: Let checkExistingOutputs work without a full butler #284

Merged
merged 1 commit into from Mar 19, 2024

Conversation

mfisherlevine
Copy link
Contributor

@mfisherlevine mfisherlevine commented Mar 15, 2024

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes

python/lsst/ctrl/mpexec/singleQuantumExecutor.py Outdated Show resolved Hide resolved
@@ -312,10 +312,6 @@ def checkExistingOutputs(self, quantum: Quantum, taskDef: TaskDef, limited_butle
RuntimeError
Raised if some outputs exist and some not.
"""
if not self.butler:
# Skip/prune logic only works for full butler.
return False
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andy-slac, do you recall why we made this shortcut? At first I thought it must be because LimitedButler didn't have pruneDatasets...but it does. So this is either something we should have done a while ago (but maybe thought we didn't need) or there's something deeper.

This is all coming up because @mfisherlevine now has a LimitedButler that wraps a another LimitedButler (which is actually a full one in this use case) and does in-memory caching, and he's got a use case for that to be able to clobber.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is all passing, but I'll wait to hear back from @andy-slac before merging anything.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this was because back then we needed access to butler.datastore for implementation of this method and limited butler did not provide that property. We had extended limited butler interface since then, so it should be OK now to allow limited butler here.

@timj
Copy link
Member

timj commented Mar 15, 2024

The docstring for this method needs some cleaning up now that limited butler is not just for queries. Should the docstring say how the limited butler relates to self.butler as well?

@mfisherlevine
Copy link
Contributor Author

Thanks Tim. This was all done with Jim, and I don't think I actually know enough about this to write something correct/that will make you happy. Could you or Jim want to just suggest how you think it should read and I'll fix it up?

@TallJimbo
Copy link
Member

Should the docstring say how the limited butler relates to self.butler as well?

I think the docstring for checkExistingOutputs can just say that the limited butler argument is now used for all parameters, and should be self.butler if there is no separate LimitedButler.

@mfisherlevine mfisherlevine force-pushed the tickets/DM-43060 branch 2 times, most recently from 3774a40 to 22237a3 Compare March 15, 2024 20:56
Copy link

codecov bot commented Mar 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.44%. Comparing base (a2f6597) to head (cb614fc).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #284      +/-   ##
==========================================
- Coverage   87.44%   87.44%   -0.01%     
==========================================
  Files          49       49              
  Lines        4469     4467       -2     
  Branches      771      770       -1     
==========================================
- Hits         3908     3906       -2     
  Misses        408      408              
  Partials      153      153              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@andy-slac andy-slac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, but there is probably one extra file that got into this commit unintentionally?

run_err.yaml Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like some left-over from debugging? Should it be here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure that started getting created by tests that don't clean up after themselves in a different ticket. @mfisherlevine, if you can spot what's making it and make it clean up, all the better, but just adding it to .gitignore instead of committing it is probably sufficient.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eigerx , can you fix this on another ticket (so Merlin can just do .gitignore)? You should be able to find some other examples of using temporary-directory context managers to put files like this in a temporary location in tests, and clean up at the end.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack, the perils of routinely typing git add -A in repos. I'll just remove it from this ticket, but also leave it out of the gitignore, so that it doesn't just get ignored. Then, when @eigerx fixes it on the other branch, it'll just go away cleanly without leaving something vestigial in the .gitignore.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, sorry all!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mfisherlevine mfisherlevine merged commit 94d7893 into main Mar 19, 2024
15 checks passed
@mfisherlevine mfisherlevine deleted the tickets/DM-43060 branch March 19, 2024 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants