Skip to content

Conversation

@nucleosynthesis
Copy link
Contributor

Main fix needed is in ModelTools

setNuisPdf = set(setNuisPdf) -> setNuisPdf = list(dict.fromkeys((setNuisPdf)))

Nick Wardle added 2 commits April 11, 2024 12:05
Main fix needed is in ModelTools

`setNuisPdf = set(setNuisPdf)` -> `setNuisPdf = list(dict.fromkeys((setNuisPdf)))`
@anigamova anigamova merged commit b7dc99d into main Apr 11, 2024
@nsmith-
Copy link
Collaborator

nsmith- commented Apr 11, 2024

FYI this will noticeably slow down text2workspace for large models, as the errline dictionary is very large. This was also seen in #791 as we tried to reduce the memory footprint.

@nsmith-
Copy link
Collaborator

nsmith- commented Apr 11, 2024

Also relevant is #759 (review)

@nucleosynthesis
Copy link
Contributor Author

nucleosynthesis commented Apr 11, 2024 via email

@nsmith-
Copy link
Collaborator

nsmith- commented Apr 11, 2024

I think that's a good plan, but perhaps more holistic solution is to refactor the parser along the lines of #818

nuisVars.add(self.out.var(c_param_name))
setNuisPdf.append(c_param_name)
setNuisPdf = set(setNuisPdf)
setNuisPdf = list(dict.fromkeys((setNuisPdf)))
Copy link
Collaborator

Choose a reason for hiding this comment

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

I did a few tests, and it seems that this line (and line 826 below) changing the sets to an ordered type are enough for exact reproducibility of the fit values on the datacards where we saw the issue when recreating the workspace. Though it may be worth understanding this more clearly.

-- On the broader point I agree with your suggestion, @nsmith- it would be nice to make those kinds of changes.

@nucleosynthesis
Copy link
Contributor Author

nucleosynthesis commented Apr 12, 2024 via email

@nucleosynthesis nucleosynthesis deleted the nckw_fix_Pdf_ordering branch June 7, 2024 17:11
kpedro88 added a commit to kpedro88/HiggsAnalysis-CombinedLimit that referenced this pull request Jan 15, 2025
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.

5 participants