-
Notifications
You must be signed in to change notification settings - Fork 39
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
Local execution of the .py
version of the ttbar analysis is broken
#143
Comments
(the patch is probably too intrusive and it does not really make sense for the notebook version of the script, so I'm not sure how to proceed -- there might be a better fix) |
Thanks for raising this, we definitely need to find a better version that works with both notebook and script. Does that patch work in the notebook as-is? I didn't think that the |
Unfortunately just wrapping the processing in I updated the branch with the patch to a simpler version that just uses EDIT: here's the simpler patch |
Thinking about this some more: I imagine it is fine to only guard the cell (or even just the commands) where the coffea execution happens and then go back, like this: ... # all the other code
if __name__ == "__main__":
run.preprocess(fileset, ...)
run(fileset, ...)
... # all the rest It is perhaps a bit unusual but this might be a minimally invasive solution, assuming it works as I imagine it does. |
I switched to local execution by setting
AF: local
inconfig.yaml
. With that change,python ttbar_analysis_pipeline.py
is not able to run. It seems that the problem is linked to running the backend "at global scope": this patch that puts all of the data processing underif __name__ == "__main__"
fixes the problem.The actual error:
with this traceback:
The text was updated successfully, but these errors were encountered: