How to ignore failed toy fit AssertionError #2303
-
|
Aloha experts, I am fitting toys by However, this only works if all fits are successful. If 1 toy fit fails, the whole loop will terminate with an |
Beta Was this translation helpful? Give feedback.
Answered by
alexander-held
Aug 18, 2023
Replies: 1 comment 7 replies
-
|
What exactly doesn't work with the second approach? |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ah I see what's probably going wrong here, indeed
pyhfcatches thatAssertionErrorand turns it into something else like apyhf.exceptions.FailedMinimization. You need to catch the latter (or catch anything via a blankexcept:though that is usually not a great idea). You should see something like the following:Catch the last assertion in the output you see.