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

Design Decisions Regarding None-Types For Parameter Validation(s) Steps #105

Closed
AFg6K7h4fhy2 opened this issue May 6, 2024 · 2 comments
Closed
Assignees
Labels
discussion pyrenew related to pyrenew internals
Milestone

Comments

@AFg6K7h4fhy2
Copy link
Collaborator

Goal

Determine design pattern for parameters of None type in the _assert_sample_and_rtype function (and possibly other functions)

Context

From TPM:

One uncertainty I had was the default behavior for the _assert_sample_and_rtype function generally. Is it a better pattern to not have a skip_if_none param and just instead have _assert_sample_and_rtype be able to handle these scenarios (latent_admissions v. observation_process, None or not None) internally?

From GVY:

That's a good question. I could be useful to post this as an issue/question. Right now, we have the NullRV class which somewhat deals with the None cases. Perhaps we could simply remove the option to skip checks as it should always be an instance of RandomVariable.

Code:

see here for example usage

_assert_sample_and_rtype(latent_infections, skip_if_none=False)
_assert_sample_and_rtype(observation_process, skip_if_none=False)

see here for the _assert_sample_and_rtype

Out of scope

  • Complete redefinition of _assert_sample_and_rtype
@AFg6K7h4fhy2 AFg6K7h4fhy2 added this to the Backlog milestone May 6, 2024
@damonbayer damonbayer added the pyrenew related to pyrenew internals label Jul 12, 2024
@damonbayer
Copy link
Collaborator

Related: #314 & #350

@dylanhmorris
Copy link
Collaborator

Closing since the relevant validation patterns have now changed.

@dylanhmorris dylanhmorris closed this as not planned Won't fix, can't repro, duplicate, stale Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion pyrenew related to pyrenew internals
Projects
None yet
Development

No branches or pull requests

4 participants