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

Checklist for 0.7 release #1082

Merged
merged 14 commits into from
Jul 11, 2021
Merged

Checklist for 0.7 release #1082

merged 14 commits into from
Jul 11, 2021

Conversation

fehiepsi
Copy link
Member

@fehiepsi fehiepsi commented Jul 2, 2021

TODO

  • Bump versions in examples/tutorials
  • Bump funsor version
  • Update docker file
  • Collect changelogs.
  • Merge LDA example PR
  • Support infer discrete in Predictive
  • Some python blocks do not rendered well in README
  • Review setup.py and docs/requirements files to make sure that the dependencies are stated correctly
  • [ ] (optional) Add some examples to Predictive DOC Add Predictive examples #1084 Defer to a later release
  • [ ] Get Add warning when initializing a substituted model #1058 merged (optional)
  • [ ] (optional) add tutorial for truncated distribution Defer to a later release

@fehiepsi fehiepsi added the WIP label Jul 2, 2021
@MarcoGorelli
Copy link
Contributor

MarcoGorelli commented Jul 2, 2021

Add some examples to Predictive

Hi @fehiepsi - where should these be added? Happy to help if you like

@fehiepsi
Copy link
Member Author

fehiepsi commented Jul 2, 2021

Thanks for offering, @MarcoGorelli! Could you help me add some snippets (not necessarily full example code) to Predictive docstring and mention Predictive in both SVI and MCMC docstring? Something like

# For MCMC
mcmc = MCMC(kernel, num_warmup=1000, num_samples=1000)
mcmc.run(rng_key0, *model_args, **model_kwargs)
posterior_samples = mcmc.get_samples()
predictive = Predictive(model, posterior_samples=posterior_samples)
samples = predictive(rng_key1, *model_args, **model_kwargs)

# For SVI
svi = SVI(model, guide, optim, elbo)
svi_result = svi.run(rng_key0, *model_args, **model_kwargs)
predictive = Predictive(model, guide=guide, params=svi_result.params, num_samples=1000)
samples = predictive(rng_key1, *model_args, **model_kwargs)

# For prior predictive
predictive = Predictive(model, num_samples=1000)
samples = predictive(rng_key1, *model_args, **model_kwargs)

@MarcoGorelli
Copy link
Contributor

Sure, will do that (as this would've helped me last week 😄 ) - when does it need doing by? I should be able to get to this on Sunday

@fehiepsi
Copy link
Member Author

fehiepsi commented Jul 2, 2021 via email

@OlaRonning
Copy link
Member

Update docker file

What changes are required?

@fehiepsi
Copy link
Member Author

fehiepsi commented Jul 5, 2021

@OlaRonning It is just removing version restriction. Are you using docker?

@OlaRonning
Copy link
Member

OlaRonning commented Jul 5, 2021

@OlaRonning It is just removing version restriction. Are you using docker?

Rarely for NumPyro, but often for preprocessing software. You mean removing this and change RUN pip install to RUN pip3 install --user numpyro jax jaxlib? Nvm, you mean numpyro version restriction.

@@ -10,7 +10,7 @@ FROM nvidia/cuda:11.2.2-cudnn8-devel-ubuntu20.04
# note that this image uses Python 3.8
ENV IMG_NAME=11.2.2-cudnn8-devel-ubuntu20.04 \
# declare the cuda version for pulling appropriate jaxlib wheel
JAXLIB_CUDA=112
JAXLIB_CUDA=111
Copy link
Member Author

Choose a reason for hiding this comment

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

there is no longer CUDA 112 version because the 111 built will work for the remaining versions in the 11x series.

Copy link
Member

Choose a reason for hiding this comment

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

I see, thanks for claryfying!

with handlers.seed(rng_seed=0): # random.PRNGKey(0) is used
x = numpyro.sample('x', dist.Beta(1, 1)) # uses a PRNGKey split from random.PRNGKey(0)
y = numpyro.sample('y', dist.Bernoulli(x)) # uses different PRNGKey split from the last one
```
Copy link
Member Author

Choose a reason for hiding this comment

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

This indentation is an attempt to make python code rendered correctly here. This only happens on readthedocs, I can't reproduce in my system.

distributions
infer
handlers
contrib
Copy link
Member Author

Choose a reason for hiding this comment

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

This is to make the sidebar closer to Pyro docs. In addition, by removing the api level, more headers can be accessed through the sidebar.

@fehiepsi fehiepsi requested review from eb8680 and fritzo July 10, 2021 19:41
@fehiepsi
Copy link
Member Author

@martinjankowiak @fritzo @eb8680 Could you help me review and merge this PR? Here I just pump the version and make the sidebar closer to Pyro docs. (there are a few other minor changes but they are nits I think).

Copy link
Collaborator

@martinjankowiak martinjankowiak left a comment

Choose a reason for hiding this comment

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

lgtm should i go ahead and merge?

@fehiepsi
Copy link
Member Author

Thanks, Martin! I can merge it. :)

@fehiepsi fehiepsi merged commit e398f19 into master Jul 11, 2021
@fehiepsi fehiepsi deleted the bump-to-0.7.0 branch July 11, 2021 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants