Skip to content

Remove SGMCMC and fix flaky mypy results #5631

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 3 commits into from
Mar 21, 2022

Conversation

michaelosthege
Copy link
Member

I upgraded Aesara and aeppl in the pre-commit environment. Some changes in Aesara's type hints mandated updates here.

For sampling_jax.py the run_mypy.py script will no longer treat it as an error if it unexpectedly passes. This caused some confusion before.

Similarly, I removed sgmcmc.py which was the second file with flaky mypy results.

Closes #5580

@@ -618,4 +618,4 @@ def find_size(

def rv_size_is_none(size: Variable) -> bool:
"""Check wether an rv size is None (ie., at.Constant([]))"""
return size.type.shape == (0,)
return size.type.shape == (0,) # type: ignore [attr-defined]
Copy link
Member Author

Choose a reason for hiding this comment

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

Ideally this should be fixed upstream, but I didn't want to put shape_utils.py onto the list of non-passing files because for shape_utils.py it's quite valuable to enforce mypy checks.

@michaelosthege michaelosthege force-pushed the fix-flaky-mypy-results branch from 11eea5c to 319ec85 Compare March 20, 2022 15:09
@codecov
Copy link

codecov bot commented Mar 20, 2022

Codecov Report

Merging #5631 (319ec85) into main (b895e40) will increase coverage by 0.49%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5631      +/-   ##
==========================================
+ Coverage   87.63%   88.13%   +0.49%     
==========================================
  Files          76       75       -1     
  Lines       13717    13641      -76     
==========================================
+ Hits        12021    12022       +1     
+ Misses       1696     1619      -77     
Impacted Files Coverage Δ
pymc/distributions/shape_utils.py 97.07% <100.00%> (ø)
pymc/sampling.py 85.98% <100.00%> (+0.01%) ⬆️

@michaelosthege michaelosthege marked this pull request as ready for review March 20, 2022 16:00
@@ -26,8 +26,8 @@ repos:
- types-filelock
- types-setuptools
- arviz
- aesara==2.4.0
- aeppl==0.0.26
Copy link
Member

Choose a reason for hiding this comment

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

Oh great, even more places for the dependencies xD

Copy link
Member Author

Choose a reason for hiding this comment

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

You can't imagine how delighted I was to learn that the greatness of YAML required me to add the dependencies in yet another place! </sarcasm>

@michaelosthege michaelosthege merged commit 7a6bd02 into pymc-devs:main Mar 21, 2022
@michaelosthege michaelosthege deleted the fix-flaky-mypy-results branch March 21, 2022 20:55
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove SGMCMC step method
2 participants