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

Deprecate remaining VI methods #5806

Merged
merged 15 commits into from
Jun 2, 2022
Merged

Conversation

purna135
Copy link
Member

Addressing #5581

@purna135
Copy link
Member Author

Hi @ferrine. Sorry about my previous PR; I believe I made a mistake when resolving merge conflicts and accidentally deleted that branch.

I deleted several flow-related tests and refactored others, but there are still 10 tests that I am unable to refactor and have commented so that other tests can be checked. Could you please assist me in refactoring the tests I commented?
Many thanks

Copy link
Member

@ferrine ferrine left a comment

Choose a reason for hiding this comment

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

I've left a lot of comments, the PR is still in a draft state. I hope that helps

pymc/tests/test_variational_inference.py Outdated Show resolved Hide resolved
pymc/tests/test_variational_inference.py Show resolved Hide resolved
pymc/tests/test_variational_inference.py Show resolved Hide resolved
pymc/tests/test_variational_inference.py Show resolved Hide resolved
pymc/tests/test_variational_inference.py Show resolved Hide resolved
pymc/variational/opvi.py Outdated Show resolved Hide resolved
pymc/variational/opvi.py Outdated Show resolved Hide resolved
pymc/variational/opvi.py Show resolved Hide resolved
pymc/variational/opvi.py Outdated Show resolved Hide resolved
pymc/variational/opvi.py Outdated Show resolved Hide resolved
@purna135 purna135 marked this pull request as draft May 27, 2022 12:29
@codecov
Copy link

codecov bot commented May 28, 2022

Codecov Report

Merging #5806 (b0ef97c) into main (4d2f3a8) will increase coverage by 0.50%.
The diff coverage is 86.36%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5806      +/-   ##
==========================================
+ Coverage   89.39%   89.89%   +0.50%     
==========================================
  Files          74       73       -1     
  Lines       13767    13198     -569     
==========================================
- Hits        12307    11865     -442     
+ Misses       1460     1333     -127     
Impacted Files Coverage Δ
pymc/variational/__init__.py 100.00% <ø> (ø)
pymc/variational/approximations.py 86.51% <62.50%> (+20.44%) ⬆️
pymc/variational/inference.py 85.78% <100.00%> (-1.46%) ⬇️
pymc/variational/opvi.py 87.01% <100.00%> (+4.57%) ⬆️
pymc/sampling.py 82.52% <0.00%> (-6.19%) ⬇️
pymc/distributions/mixture.py 95.72% <0.00%> (-1.04%) ⬇️
pymc/parallel_sampling.py 86.46% <0.00%> (-1.00%) ⬇️
... and 7 more

@purna135
Copy link
Member Author

Hello, @ferrine Thank you for your feedback; I worked on it and am finally finished with it.
I have some question for which I require your assistance.

  1. Replacing NormalizingFlowGroup with MeanFieldGroup.
  2. Removing NotImplementedInference

I commented them out in the code above please have a look and also please let me know if I missed anything in the docstring.

Thank you : )

@ferrine
Copy link
Member

ferrine commented Jun 1, 2022

I'll be on these issues in a day or two with a close look

Copy link
Member

@ferrine ferrine left a comment

Choose a reason for hiding this comment

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

The last test refactoring is required to go ahead. I've proposed a snippet to resolve the failing test

pymc/tests/test_variational_inference.py Show resolved Hide resolved
@purna135
Copy link
Member Author

purna135 commented Jun 2, 2022

Sure @ferrine, Thank you.
let me do one more commit with these changes

@ferrine ferrine marked this pull request as ready for review June 2, 2022 14:26
@twiecki
Copy link
Member

twiecki commented Jun 2, 2022

@purna135 want to join our dev sprint? https://discord.gg/Hpne6mtJ

@purna135
Copy link
Member Author

purna135 commented Jun 2, 2022

Joining in few min, Thank you

@ferrine
Copy link
Member

ferrine commented Jun 2, 2022

I've created an issue to fix deterministic sampling for Empirical approx (#5837 )

Copy link
Member

@ferrine ferrine left a comment

Choose a reason for hiding this comment

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

lgtm

@ferrine ferrine merged commit de9db67 into pymc-devs:main Jun 2, 2022
@purna135
Copy link
Member Author

purna135 commented Jun 2, 2022

Thnak you so much @ferrine and @twiecki 😊

@twiecki
Copy link
Member

twiecki commented Jun 2, 2022

Congrats on your first PR @purna135 -- thanks for your help!

@purna135 purna135 deleted the deprecate_vi_methods branch June 15, 2022 15:08
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.

3 participants