pyhf
pyhf copied to clipboard
xml2json breaks with HistoPath including filename
Summary
I ran into a setup I hadn't seen previously that seems to break pyhf xml2json
. As far as I can tell, cases like the following are problematic:
<Data HistoName="tt1b_1l_data_regBin" InputFile="Fit_1l_combined_Fit_1l_model_428.root" HistoPath="Fit_1l_combined_Fit_1l_model_428.root:/tt1b_1l_hists/data/" />
Note how HistoPath
includes intra-file navigation. The hist2workspace
CLI in ROOT seems to handle this fine. I am not sure if this is following intended specification or not and if hist2workspace
not crashing is a coincidence or not. The conversion script looks at Fit_1l_combined_Fit_1l_model_428.root:/tt1b_1l_hists/data/
but would need to look at tt1b_1l_hists/data/
in the file, stripping out the file name.
I do not have a minimal public setup to reproduce, please feel free to ping me here and I can put one together (just opening this issue before I forget so we can track it).
OS / Environment
n/a
Steps to Reproduce
n/a
File Upload (optional)
No response
Expected Results
successful conversion
Actual Results
KeyError: 'Both tt_light_1l_data_regBin and Fit_1l_combined_Fit_1l_model_428.root:/tt_light_1l_hists/data/tt_light_1l_data_regBin were tried and not found in [...]/Fit_1l_combined_Fit_1l_model_428.root'
pyhf Version
f561f867f1327ccfa8e631885d28e87863930d8b (newer than v0.7.6)
Code of Conduct
- [X] I agree to follow the Code of Conduct