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

Moving away from the NamedTuple to instead use argument splitting. #63

Closed
SamuelBrand1 opened this issue Feb 23, 2024 · 1 comment · Fixed by #65
Closed

Moving away from the NamedTuple to instead use argument splitting. #63

SamuelBrand1 opened this issue Feb 23, 2024 · 1 comment · Fixed by #65
Assignees
Labels

Comments

@SamuelBrand1
Copy link
Collaborator

...we may move away from the NamedTuple to instead use argument splitting.

Originally posted by @seabbs in #61 (review)

@SamuelBrand1
Copy link
Collaborator Author

Current API

At the moment, we have the priors for any process abstracted as a NamedTuple, e.g. priors = (sigma_prior = some_dist,). These priors are then given to the Turing model constructors as a NamedTuple. At a high level, the Turing model constructors are not exposed to the user, and if users are happy to use default priors then the priors are invisible.

Problem

Our view is that it is safer code practise to have lower level functions depend as little on the hierarchy of code options as possible so that each level can be tested/iterated in as robust manner as possible.

Solution

At the lower Turing model constructor level to change the ingestion of priors into splatted keyword argument, with each prior distribution being defined as a kwarg in kwargs.... This change will be invisible to high level users because the NamedTuple of priors will be splatted to kwargs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants