Skip to content

Commit

Permalink
Tutorial reorganzation (#1656)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpchen authored and fritzo committed Dec 7, 2018
1 parent 7a25559 commit 2fc96ff
Show file tree
Hide file tree
Showing 12 changed files with 68 additions and 13 deletions.
3 changes: 1 addition & 2 deletions tutorial/source/RSA-hyperbole.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"metadata": {},
"source": [
"# Understanding Hyperbole using RSA\n",
"(This tutorial written by Noah Goodman and Eli Bingham, following Kao, Wu, Bergen, and Goodman (2014).)\n",
"\n",
" \"My new kettle cost a million dollars.\"\n",
"\n",
Expand Down Expand Up @@ -448,7 +447,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.2"
"version": "3.6.7"
}
},
"nbformat": 4,
Expand Down
4 changes: 1 addition & 3 deletions tutorial/source/RSA-implicature.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
"metadata": {},
"source": [
"# The Rational Speech Act framework\n",
"(This tutorial written by Noah Goodman and Eli Bingham)\n",
"\n",
"Human language depends on the assumption of *cooperativity*, that speakers attempt to provide relevant information to the listener; listeners can use this assumption to reason *pragmatically* about the likely state of the world given the utterance chosen by the speaker.\n",
"\n",
"The Rational Speech Act framework formalizes these ideas using probabiistic decision making and reasoning.\n",
Expand Down Expand Up @@ -243,7 +241,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.2"
"version": "3.6.7"
}
},
"nbformat": 4,
Expand Down
4 changes: 2 additions & 2 deletions tutorial/source/bayesian_regression.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@
"source": [
"In the next section, we'll look at how to write guides for variational inference as well as compare the results with inference via HMC.\n",
"\n",
"See the full code on [Github](https://github.com/uber/pyro/blob/dev/examples/bayesian_regression.py)."
"See an example with a toy dataset on [Github](https://github.com/uber/pyro/blob/dev/examples/bayesian_regression.py)."
]
},
{
Expand Down Expand Up @@ -684,7 +684,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.2"
"version": "3.6.7"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion tutorial/source/bayesian_regression_ii.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Bayesian Regression - Inference Algorithms and Autoguides (Part 2)"
"# Bayesian Regression - Inference Algorithms (Part 2)"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions tutorial/source/effect_handlers.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Poutine: a guide to programming with effect handlers in Pyro\n",
"# Poutine: A Guide to Programming with Effect Handlers in Pyro\n",
"\n",
"**Note to readers**: This tutorial is a guide to the API details of Pyro's effect handling library, [Poutine](http://docs.pyro.ai/en/dev/poutine.html). We recommend readers first orient themselves with the simplified [minipyro.py](https://github.com/uber/pyro/blob/dev/pyro/contrib/minipyro.py) which contains a minimal, readable implementation of Pyro's runtime and the effect handler abstraction described here. Pyro's effect handler library is more general than minipyro's but also contains more layers of indirection; it helps to read them side-by-side."
]
Expand Down Expand Up @@ -715,7 +715,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
"version": "3.6.7"
}
},
"nbformat": 4,
Expand Down
4 changes: 2 additions & 2 deletions tutorial/source/enumeration.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Inference with discrete latent variables\n",
"# Inference with Discrete Latent Variables\n",
"\n",
"This tutorial describes Pyro's enumeration strategy for discrete latent variable models.\n",
"This tutorial assumes the reader is already familiar with the [Tensor Shapes Tutorial](http://pyro.ai/examples/tensor_shapes.html).\n",
Expand Down Expand Up @@ -557,7 +557,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.2"
"version": "3.6.7"
}
},
"nbformat": 4,
Expand Down
11 changes: 11 additions & 0 deletions tutorial/source/hmm.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Hidden Markov Model
===================

`View hmm.py on github`__

.. _github: https://github.com/uber/pyro/blob/dev/examples/hmm.py

__ github_

.. literalinclude:: ../../examples/hmm.py
:language: python
14 changes: 14 additions & 0 deletions tutorial/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ Welcome to Pyro Examples and Tutorials!
svi_part_ii
svi_part_iii
tensor_shapes

.. toctree::
:maxdepth: 2
:caption: Advanced:

enumeration
custom_objectives
jit
Expand Down Expand Up @@ -46,6 +51,15 @@ Welcome to Pyro Examples and Tutorials!
RSA-hyperbole
ekf

.. toctree::
:maxdepth: 2
:caption: Code Examples:

hmm
lda
mcmc
sparse_gamma


Indices and tables
==================
Expand Down
2 changes: 1 addition & 1 deletion tutorial/source/jit.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Using the PyTorch jit compiler with Pyro\n",
"# Using the PyTorch JIT Compiler with Pyro\n",
"\n",
"This tutorial shows how to use the PyTorch [jit compiler](https://pytorch.org/docs/master/jit.html) in Pyro models.\n",
"\n",
Expand Down
11 changes: 11 additions & 0 deletions tutorial/source/lda.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Latent Dirichlet Allocation
===========================

`View hmm.py on github`__

.. _github: https://github.com/uber/pyro/blob/dev/examples/lda.py

__ github_

.. literalinclude:: ../../examples/lda.py
:language: python
11 changes: 11 additions & 0 deletions tutorial/source/mcmc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Markov Chain Monte Carlo
========================

`View hmm.py on github`__

.. _github: https://github.com/uber/pyro/blob/dev/examples/eight_schools/mcmc.py

__ github_

.. literalinclude:: ../../examples/eight_schools/mcmc.py
:language: python
11 changes: 11 additions & 0 deletions tutorial/source/sparse_gamma.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Sprase Gamma Deep Exponential Family
====================================

`View sparse_gamma_def.py on github`__

.. _github: https://github.com/uber/pyro/blob/dev/examples/sparse_gamma_def.py

__ github_

.. literalinclude:: ../../examples/sparse_gamma_def.py
:language: python

0 comments on commit 2fc96ff

Please sign in to comment.