-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Improve join_nonshared_inputs
documentation
#6216
Improve join_nonshared_inputs
documentation
#6216
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #6216 +/- ##
==========================================
- Coverage 94.14% 91.29% -2.86%
==========================================
Files 100 100
Lines 21239 21240 +1
==========================================
- Hits 19996 19391 -605
- Misses 1243 1849 +606
|
still WIP. Would like to add more to the docstring. The current example is similar to that of the |
Thanks for opening the PR, I will try to review tomorrow |
thanks. no rush |
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.
Great start! I left some suggestions to be more precise, and more succinct / readable examples. Let me know what you think.
While reviewing I also realized we could come up with much better argument names for the function (and internal variables) instead of xs
, vars
, and inarray
, xs_special
. Probably outputs
, inputs
, joined_inputs
, new_outputs
, would be more readable?
join_nonshared_inputs
documentationjoin_nonshared_inputs
documentation
Thanks for all the suggestions. All very good and am working through the edits |
f9abe5c
to
564ab09
Compare
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 looks amazing! I left one type-hint suggestion and a question that I am not sure about
everything should be addressed EDIT: I forgot to change the one dict mapping lol |
The failing test seems unrelated and I think I already saw it failing before. Do you mind opening an issue to track it? |
Looks like the recent renaming of the SMC files introduced conflicts.. I will give it a try at rebasing |
fe95d58
to
7065982
Compare
@wd60622 I was confused why GitHub doesn't show your profile picture (and link) on the commits after I rebased them. You can set it up under https://github.com/settings/emails and then GitHub should show your avatar on the commit messages again. |
pymc/aesaraf.py
Outdated
point: a sample point | ||
xs: list of Aesara tensors | ||
vars: list of variables to join | ||
point : Point |
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 am not sure point is the right type. It does not match the type signature and it is not a "metatype" meaning a subset of dicts that match these properties but a different amd specific class. Does anybody know?
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.
Yeah. I'm not sure either. I was going off Point
being in reference link and the fact that Point
function would construct the same type as the alternative.
i.e. Dict[str, np.ndarray]
let me know which fits best with the package
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.
Dict[str, np.ndarray]
is the correct type here, but I'd say Point
is also fine because users/devs probably understand what is meant in this context.
With the exact type hints in the signature, I treat the hints in the docstring as the "human readable" version, and often times I leave them away to not duplicate the information.
What is our policy, @OriolAbril ?
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.
Then this is what should be used (with the correft numpydoc formatting) instead of point which is therefore an invalid type. This function is on the website and it needs to have the type info properly documented in the docstring having users in mind
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.
Okay. So I am hearing to switch back to the dict of {str : array_like}
. Is that correct?
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.
Why is Point referenced in the docs/.../conf.py
Is there a purpose or usecase?
All fixed. I had my account email switch recently. Thanks for the tip. Looks more legit now 😄 |
Not sure why the doc build failed. I haven't seen that error before |
The readthedocs error is a conda error don't have a clue as to why this is happening though. Hopefully it is a fluke |
Any more items for this PR? |
IIRC that one |
Gotcha. Never got confirmation there. So the type hint is |
The code coverage seems unrelated to my changes. and FYI I'm unable to merge bc access |
New git conflicts 😕 Squashing the commits from the branch might already help to resolve the conflicts, and should probably be done before rebasing it |
Thanks @wd60622! |
Thank you for the help and feedback! |
What is this PR about?
This PR closes issue 6105 and increase the documentation of
join_nonshared_inputs
function inpymc/aesaraf.py
Checklist
Major / Breaking Changes
Bugfixes / New features
Docs / Maintenance
join_nonshared_inputs
and improving docstrings