You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm sure you've probably already noticed this, but currently there is an ownership issue between ROOT and Python in the WorkspaceBuilder.ipynb code that will cause a segfault after the Jupyter kernel is restarted or if you export the Notebooks to .py and then try to run them. As I have discovered in similar code that I am writing for my own project this can be fixed by telling Python to not take ownership of a ROOT.RooStats.HistFactory object by calling ROOT.SetOwnership(object_name, False) after object creation. For example, after the creation of the first Channel() object in the example section of WorkspaceBuilder.ipynb one would call
It seems that this issue hasn't come up in Builder.py module, as exporting the WorkspaceBuilder.ipynb to .py and commenting out everything except for the lines
does NOT result in a segfault and so everything is good to go. So this doesn't seem to be an issue for you in terms of deployment of the code you really care about. However, if you notice in the future that you're getting weird segfaults this may be the issue.
The text was updated successfully, but these errors were encountered:
I think it's possibly related but not the same. Builder.py is built independently of WorkspaceBuilder.ipynb as a philosophical choice. I use notebooks to test algorithms but then refactor them to use in 'real' code. I never use the export to .py function in Jupyter.
I remember testing this as a possible solution to the 'too many files opened' problem but it didn't help.
I'm sure you've probably already noticed this, but currently there is an ownership issue between ROOT and Python in the
WorkspaceBuilder.ipynb
code that will cause a segfault after the Jupyter kernel is restarted or if you export the Notebooks to.py
and then try to run them. As I have discovered in similar code that I am writing for my own project this can be fixed by telling Python to not take ownership of aROOT.RooStats.HistFactory
object by callingROOT.SetOwnership(object_name, False)
after object creation. For example, after the creation of the firstChannel()
object in the example section ofWorkspaceBuilder.ipynb
one would callIt seems that this issue hasn't come up in
Builder.py
module, as exporting theWorkspaceBuilder.ipynb
to.py
and commenting out everything except for the linesdoes NOT result in a segfault and so everything is good to go. So this doesn't seem to be an issue for you in terms of deployment of the code you really care about. However, if you notice in the future that you're getting weird segfaults this may be the issue.
The text was updated successfully, but these errors were encountered: