Skip to content
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

Merged
merged 24 commits into from
Aug 5, 2024

Conversation

AlexanderFengler
Copy link
Collaborator

fixes failing tests in #522 .

cpaniaguam and others added 16 commits July 19, 2024 14:36
…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
@AlexanderFengler AlexanderFengler marked this pull request as ready for review August 3, 2024 18:09
@digicosmos86 digicosmos86 changed the base branch from main to bambi-014-fix-inference-data August 5, 2024 13:18
Copy link
Collaborator

@digicosmos86 digicosmos86 left a 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
Comment on lines 1007 to 1010
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.")
Copy link
Collaborator

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

Copy link
Collaborator Author

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

Copy link
Collaborator Author

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?

@digicosmos86
Copy link
Collaborator

Looks great! Just one minor issue with if statements lol

@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

Base automatically changed from bambi-014-fix-inference-data to 490-refactor-for-bambi-014 August 5, 2024 19:24
@digicosmos86 digicosmos86 merged commit 93d1f6d into 490-refactor-for-bambi-014 Aug 5, 2024
2 checks passed
@digicosmos86 digicosmos86 deleted the bambi-fix-shape-issues branch August 5, 2024 19:45
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.

3 participants