Skip to content

Standardize test messages to use the permissible constraints (i.e. the thing being asserted) #6158

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ccaprani opened this issue Sep 28, 2022 · 2 comments

Comments

@ccaprani
Copy link

Following on from the discussion here pymc-devs/pymc-extras#84 (comment) with @ricardoV94, in many places the test message is written in the opposite direction to the check it looks like, e.g. Gumbel, Logistic, Normal, HalfNormal, Beta; e.g.

check_parameters(res, 0 < beta, msg="beta > 0")

Others are written in the same direction, e.g. TruncatedNormal, Wald, Kumaraswamy and so on.

logp = check_parameters(
                logp,
                at.le(lower, upper),
                msg="lower_bound <= upper_bound",
            )

Messages should be standardized to use the permissable constraints; i.e. written in the same direction.

@ricardoV94
Copy link
Member

That first example is fine, the expression is the same just written the other way around. The problem is if it has the opposite meaning

@ricardoV94
Copy link
Member

Closed via #6272

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

No branches or pull requests

2 participants