-
-
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
Updated docstrings in pymc.model.core.Model #7118
Updated docstrings in pymc.model.core.Model #7118
Conversation
…ymc into model.core_docstring_update merging latest changes from main
] |
Great first contribution @apalermo01 - thanks! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7118 +/- ##
==========================================
- Coverage 92.21% 88.61% -3.61%
==========================================
Files 101 101
Lines 16901 16901
==========================================
- Hits 15586 14977 -609
- Misses 1315 1924 +609
|
@apalermo01 sorry for the delay. I am merging this because the current changes are already useful. Let me know if you are still interested in tackling the other issues you mentioned and I will try and respond to them. Thanks! |
Description
First time contributor here (both to pymc and open source) - updated docstrings in pymc.model.core.Model to follow numpydoc.
There are some details that I need to call out. Some of these are notes that the instructions asked to raise (1-3), some are questions I have since I'm still unfamiliar with the codebase (4-9):
Should
rv_var
in these function be a TensorVariable or tensor_like?make_obs_var
create_value_var
register_rv
I found ndarray in the input arguments for these functions:
make_obs_var
compile_fn (in return type)
update_start_vals
initial_point
set_data
replace_rvs_by_value (in return type)
The value_var parameter is marked as a Variable - can I get a confirmation that this should not be RandomVariable?
There weren't any type hints in these functions. I think I can infer some of these, but I think changes like that would be out of scope for this PR.
__init__
logp_dlogp_function
shape_from_dims
set_initval
register_rv
make_obs_var (dims only)
add_named_variable (just var - should this be Variable?)
profile
point_logps
There originally weren't any parameters documented or type hints for these functions.
shape_from_dims
set_initval
These functions didn't have a parameters section.
create_value_var
add_named_variable
update_start_vals
In
register_rv
- what should the datatypes be fortransform
andinitval
? Additionally, I'm not clear on what UNSET is doing.In the
add_coords
function - shouldModel.add_coord
be single or double backticks?In
compile_fn
, what's the datatype formode
? I'm assuming its a string. Digging into pytensor it looks like the options for mode are "FAST_COMPILE", "FAST_RUN", "DebugMode", "NanGuardMode", and "DEBUG_MODE".Related Issue
Checklist
Type of change
📚 Documentation preview 📚: https://pymc--7118.org.readthedocs.build/en/7118/