-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Add @as_model
decorator
#268
Conversation
Just a bit worried about name clash between the module |
The URL in the docstrings doesn't seem to render correctly: https://pymcio--268.org.readthedocs.build/projects/experimental/en/268/generated/pymc_experimental.model.html |
Have there been bugs or issues due to this kind of name clash before? |
We had some issues with docs in the past, when a function had the same name as the module |
hopefully all good to go now |
Would be nice to give @zaxtax some credit here, commit co-author? |
827cc59
to
f1a1fe8
Compare
Co-authored-by: Rob Zinkov <8529+zaxtax@users.noreply.github.com>
f1a1fe8
to
b5210f7
Compare
Thanks @theorashid |
|
||
def decorator(f): | ||
@wraps(f) | ||
def make_model(*args, **kwargs): |
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.
I would also add a name kwarg here to change model name
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.
You can pass it to model_kwargs
Also move
marginal_model
intopymc_experimental/model
. Hopefully I reorganised the file structure correctlycc: @ricardoV94 @zaxtax @twiecki