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

fix Model docstring #6048

Merged
merged 5 commits into from
Aug 26, 2022
Merged

Conversation

alekracicot
Copy link
Contributor

@alekracicot alekracicot commented Aug 10, 2022

What is this PR about?
...
Description: Change Model docstring
Issue name Model docstring is outdated
Closes #6040

Checklist

  • [x ] Explain important implementation details 👆
  • [x ] Make sure that the pre-commit linting/style checks pass. (really just changed the docstring.
  • [ x] Link relevant issues (preferably in nice commit messages)
  • [x ] Are the changes covered by tests and docstrings? No test needed, only doc)
  • [ x] Fill out the short summary sections 👇

Major / Breaking Changes

  • ...

Bugfixes / New features

  • ...

Docs / Maintenance

  • Fix docstring for the Model class, replacing var by register_rv

@alekracicot alekracicot marked this pull request as ready for review August 11, 2022 17:32
@michaelosthege
Copy link
Member

There are a few mentions of the pm.Model class that don't have a pm. in front yet.

I tried to commit to your branch to get this over the finish line, but somehow I couldn't. (At least not in GitHub.)

@alekracicot can you insert the pm. also for the mentions of Model in the docstring?

@alekracicot
Copy link
Contributor Author

Yeah absolutely, I'll do that right now.

@alekracicot
Copy link
Contributor Author

@michaelosthege, I added the changes.

@reshamas
Copy link
Contributor

Hi @alekracicot
Did you learn of contributing to PyMC from this website?
https://pymc-data-umbrella.xyz/en/latest/2022-07_sprint/schedule.html

Or some other avenue?

@alekracicot
Copy link
Contributor Author

@reshamas No mostly the contributing section on the pymc website.

@alekracicot alekracicot reopened this Aug 20, 2022
@codecov
Copy link

codecov bot commented Aug 20, 2022

Codecov Report

Merging #6048 (87e2469) into main (ad16bf4) will decrease coverage by 0.21%.
The diff coverage is n/a.

❗ Current head 87e2469 differs from pull request most recent head b88ade7. Consider uploading reports for the commit b88ade7 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6048      +/-   ##
==========================================
- Coverage   89.27%   89.05%   -0.22%     
==========================================
  Files          72       72              
  Lines       12890    12924      +34     
==========================================
+ Hits        11507    11510       +3     
- Misses       1383     1414      +31     
Impacted Files Coverage Δ
pymc/model.py 88.20% <ø> (ø)
pymc/model_graph.py 78.31% <0.00%> (-17.15%) ⬇️
pymc/step_methods/hmc/base_hmc.py 89.76% <0.00%> (-0.79%) ⬇️
pymc/distributions/simulator.py 87.50% <0.00%> (ø)

pymc/model.py Outdated
@@ -466,51 +466,50 @@ def __init__(self, mean=0, sigma=1, name=''):
# will get model's name prefix

# 3) you can create variables with Var method
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still mentions var method

pymc/model.py Outdated
@@ -466,51 +466,50 @@ def __init__(self, mean=0, sigma=1, name=''):
# will get model's name prefix

# 3) you can create variables with Var method
self.Var('v1', Normal.dist(mu=mean, sigma=sd))
# this will create variable named like '{prefix::}v1'
self.register_rv(pm.Normal.dist(mu=mean, sigma=sigma), 'v1', initval=1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self.register_rv(pm.Normal.dist(mu=mean, sigma=sigma), 'v1', initval=1)
self.register_rv(Normal.dist(mu=mean, sigma=sigma), 'v1', initval=1)

Why are we adding the pm prefix and showing initval?

Copy link
Member

@ricardoV94 ricardoV94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are still new pm. bring introduced in the rest of the changes

pymc/model.py Show resolved Hide resolved
@alekracicot
Copy link
Contributor Author

Ok, I will remove the pm.

pymc/model.py Outdated Show resolved Hide resolved
pymc/model.py Show resolved Hide resolved
@ricardoV94 ricardoV94 merged commit fa5e441 into pymc-devs:main Aug 26, 2022
@ricardoV94
Copy link
Member

Thanks @alekracicot!

@alekracicot alekracicot deleted the fix-Model-docstring branch November 28, 2022 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Model docstring is outdated
5 participants