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-45894: Fix dimension universe instantiation in subprocesses #304

Merged
merged 4 commits into from
Aug 24, 2024

Conversation

andy-slac
Copy link
Collaborator

@andy-slac andy-slac commented Aug 23, 2024

With run-qbb when dimension universe is not the default one, we need
to make sure that that universe is instantiated from a configuration
in a subprocess before unpickling anything that requires that universe.
The fix uses butler factory to do that, using its unpickle method,
and there is some complicated logic in executors to make sure that
unpickling of that factory happens first thing in a subprocess.
There may be an easier way to enforce that but it would require
interface changes for MPGraphExecutor or SingleQuantumExecutor.

Subprocess parameters are now pickled manually to guarantee that
logging is initialized properly in a subprocess before any complex
unpickling happens.

Checklist

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

Copy link

codecov bot commented Aug 23, 2024

Codecov Report

Attention: Patch coverage is 44.44444% with 10 lines in your changes missing coverage. Please review.

Project coverage is 88.95%. Comparing base (6d12fdf) to head (66e7b6c).
Report is 5 commits behind head on main.

Files Patch % Lines
python/lsst/ctrl/mpexec/cmdLineFwk.py 28.57% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #304      +/-   ##
==========================================
- Coverage   89.16%   88.95%   -0.21%     
==========================================
  Files          50       50              
  Lines        4376     4393      +17     
  Branches      726      728       +2     
==========================================
+ Hits         3902     3908       +6     
- Misses        335      345      +10     
- Partials      139      140       +1     

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

Copy link
Member

@timj timj left a comment

Choose a reason for hiding this comment

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

Looks good.

python/lsst/ctrl/mpexec/cmdLineFwk.py Show resolved Hide resolved
python/lsst/ctrl/mpexec/mpGraphExecutor.py Outdated Show resolved Hide resolved
Subprocess parameters are now pickled manually to guarantee that
logging is initialized properly in a subprocess before any complex
unpickling happens.
With run-qbb when dimension universe is not the default one, we need
to make sure that that universe is instantiated from a configuration
in a subprocess before unpickling anything that requires that universe.
The fix uses butler factory to do that, using its unpickle method,
and there is some complicated logic in executors to make sure that
unpickling of that factory happens first thing in a subprocess.
There may be an easier way to enforce that but it would require
interface changes for MPGraphExecutor or SingleQuantumExecutor.
@andy-slac andy-slac merged commit 4571279 into main Aug 24, 2024
13 of 15 checks passed
@andy-slac andy-slac deleted the tickets/DM-45894 branch August 24, 2024 02:33
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.

2 participants