-
Notifications
You must be signed in to change notification settings - Fork 49
Remove arviz as a dependency #1822
base: main
Are you sure you want to change the base?
Conversation
0c70d9f
to
cdcf5f9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing ArviZ dependency sounds fine to me, though in this case we should also remove the global import in monte_carlo_sample.py
(because this module will be imported when people import beanmachine
, and we don't want it to raise an ModuleNotFoundError
due to missing ArviZ dependency.
We can consider moving the ArviZ import into to_inference_data
method for now, so that the ArviZ dependency is only required if users need to do the conversion.
This will also prevent a circular dependency with arviz.
Looks like ArviZ only has Bean Machine as an external dependency, so even if we keep ArviZ as-is, this shouldn't cause any circular dependency issue. In fact, it looks like PyMC also depends on ArviZ at the moment and that works just fine for them
I'm happy to leave in the arviz import. Also with the contents of
to_inference_data merged, we could remove it as well.
…On Thu, 15 Dec 2022, 20:49 Xiaoyan Wang, ***@***.***> wrote:
***@***.**** requested changes on this pull request.
Removing ArviZ dependency sounds fine to me, though in this case we should
also remove the global import in monte_carlo_sample.py
<https://github.com/facebookresearch/beanmachine/blob/a411c6efea2955380504752349bffcfb73a0e3a6/src/beanmachine/ppl/inference/monte_carlo_samples.py#L8>
(because this module will be imported when people import beanmachine, and
we don't want it to raise an ModuleNotFoundError due to missing ArviZ
dependency.
We can consider moving the ArviZ import into to_inference_data method for
now, so that the ArviZ dependency is only required if users need to do the
conversion.
This will also prevent a circular dependency with arviz.
Looks like ArviZ only has Bean Machine as an external dependency, so even
if we keep ArviZ as-is, this shouldn't cause any circular dependency issue.
In fact, it looks like PyMC also depends on ArviZ
<https://github.com/pymc-devs/pymc/blob/main/requirements.txt#L1> at the
moment and that works just fine for them
—
Reply to this email directly, view it on GitHub
<#1822 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAACCUNT7HWIKX73WAKGVVTWNNY5JANCNFSM6AAAAAAR5C35RA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
We could also use the
as a decorator for the
Using this, I think we can remove the ArviZ import, and if the user wanted to call the |
eaf8aa8
to
28714c4
Compare
Motivation
This removes arviz as an explicit dependency of Bean Machine. This will also prevent a circular dependency with arviz.
Changes proposed
Updates setup.py and moves import into
to_inference_data
Types of changes
Checklist