-
Notifications
You must be signed in to change notification settings - Fork 11
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
Bambi fix shape issues #534
Bambi fix shape issues #534
Conversation
refactor: use fstring in error message
…ck-in-paramupdate Fix Param.update and add test case
…f-assert Fix validation and remove unnecessary assert statements
* adding new version of main tutorial * more improvements to tutorial * change install instructions * chainge warning settings * block bambi 0.14.0 * add exercise data * add no solution version of workshop * slight corrections * take out no-sol version * fix nan sigma values for categorical covariates * delete tutorial content that was not supposed to be part of this branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Just one minor issue with if statements lol
src/hssm/hssm.py
Outdated
elif (not isinstance(data, az.InferenceData)) and (data is not None): | ||
raise ValueError("data must be an InferenceData object.") | ||
elif data is None: | ||
raise ValueError("Please sample to model first.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For clarity, I'd use just one if block. We already have an assert statement to ensure that data
is of type az.InferenceData
, so just an else block that throws an error should be sufficient
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok thinking about the logic, I think we were able to just take the whole if logic out and rely on the fact that data
must be InferenceData
at this point anyways. @digicosmos86
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needed to change in two places.
Will let the tests run now, then merge?
@AlexanderFengler also I am changing the merge target to the previous PR (fix InferenceData). We need to merge this one first before merging that one |
fixes failing tests in #522 .