Skip to content

How to ignore failed toy fit AssertionError #2303

Answered by alexander-held
zjkjsd asked this question in Q&A
Discussion options

You must be logged in to vote

Ah I see what's probably going wrong here, indeed pyhf catches that AssertionError and turns it into something else like a pyhf.exceptions.FailedMinimization. You need to catch the latter (or catch anything via a blank except: though that is usually not a great idea). You should see something like the following:

AssertionError

During handling of the above exception, another exception occurred:
[...]
pyhf.exceptions.FailedMinimization: Inequality constraints incompatible

Catch the last assertion in the output you see.

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@zjkjsd
Comment options

@alexander-held
Comment options

@zjkjsd
Comment options

@alexander-held
Comment options

Answer selected by zjkjsd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants