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 #5581

Closed
ricardoV94 opened this issue Mar 11, 2022 · 13 comments
Closed

Deprecate remaining VI methods #5581

ricardoV94 opened this issue Mar 11, 2022 · 13 comments
Labels
beginner friendly VI Variational Inference
Milestone

Comments

@ricardoV94
Copy link
Member

#4582 left some old VI methods marked as NotImplemented

Normalizing flows:

raise NotImplementedInference("Normalizing flows are not yet ported to v4")

And these:

if self.local:
raise NotImplementedInference("Local inferene aka AEVB is not supported in v4")
if self.batched:
raise NotImplementedInference("Batched inferene is not supported in v4")

We should decide whether we want to refactor or remove them

@ricardoV94 ricardoV94 added request discussion VI Variational Inference labels Mar 11, 2022
@ricardoV94
Copy link
Member Author

CC @ferrine, @fonnesbeck, @twiecki

@twiecki
Copy link
Member

twiecki commented Mar 11, 2022

My vote is on removing them, don't think anyone uses those. If they do, they'll probably complain. We could ask on discourse too.

@fonnesbeck
Copy link
Member

I'm pretty sure OVPI can go, but normalizing flows are something we would want. They are a pretty useful and are available in most VI implementations these days (e.g. pyro, TF). That said, they can always be added back if anyone ever wants to implement them.

@ferrine
Copy link
Member

ferrine commented Mar 11, 2022

I'd vote for removal, agree with @fonnesbeck. This functionality did not prove to be super useful.

@fonnesbeck
Copy link
Member

@ferrine do you think it will be straightforward to get normalizing flows ported? Were they fully functional in v3?

@ferrine
Copy link
Member

ferrine commented Mar 13, 2022

they were, but that time I struggled with shape inference for parameter creation. In v3 I relied on test values for NF, now test values are less strict and it broke the internals. To fix this issue new mechanism has to be implemented to initialize normalizing flows.

@ferrine
Copy link
Member

ferrine commented Mar 13, 2022

To summarize there are 3 blocks of features

  • AEVB that is all self.local occasions. It is rarely used, and not PyMC focus
  • batched block sparse inference. All self.batched occasions. Was used to improve UX of AEVB
  • Normalizing flows. Normalizing flows API is nice but stays very far from PyMC focus. I'm ok to just delete it

@ricardoV94
Copy link
Member Author

So shall we delete everything and open an issue to re-implement normalizing flows in the future (either here or in pymc-experimental)?

@twiecki
Copy link
Member

twiecki commented Mar 14, 2022

That sounds good to me.

@ricardoV94 ricardoV94 changed the title Refactor or deprecate remaining VI methods Deprecate remaining VI methods Mar 14, 2022
@ricardoV94 ricardoV94 added this to the v4.0.0 milestone Mar 14, 2022
@fonnesbeck
Copy link
Member

Yes, seems sensible, assuming "everything" is all methods with NotImplementedInference exceptions.

@purna135
Copy link
Member

I would like to work on this.

@twiecki
Copy link
Member

twiecki commented Mar 22, 2022

@purna135 Great, just open a draft PR when you have a start so that others can see that you're working on this.

@purna135
Copy link
Member

Sure @twiecki, Thank You

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginner friendly VI Variational Inference
Projects
None yet
Development

No branches or pull requests

5 participants