Skip to content

Commit 9ebaa17

Browse files
authored
Merge branch 'cdf_methods' into cdf_methods
2 parents d63e7f5 + 269766b commit 9ebaa17

File tree

134 files changed

+10077
-2218
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+10077
-2218
lines changed

.travis.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,18 @@ before_install:
66
- "sh -e /etc/init.d/xvfb start"
77
- if [ ${MATPLOTLIB} = "1.2" ]; then mkdir $HOME/.matplotlib; fi
88
- if [ ${MATPLOTLIB} = "1.2" ]; then cp ${SRCDIR}/tools/matplotlibrc $HOME/.matplotlib/matplotlibrc; fi
9-
#- mkdir -p $HOME/.config/matplotlib; echo "backend: agg" > $HOME/.config/matplotlib/matplotlibrc
109

1110
install:
1211
- . ./scripts/create_testenv.sh
1312
- pip install coveralls pylint
1413

1514
env:
16-
- PYTHON_VERSION=2.7 TESTCMD=" -vv --with-timer --with-coverage --cover-package=pymc3 -e test_examples -e test_distributions"
17-
- PYTHON_VERSION=2.7 RUN_PYLINT="true" TESTCMD=" -vv --with-timer --with-coverage --cover-package=pymc3 pymc3.tests.test_distributions pymc3.tests.test_examples"
18-
- PYTHON_VERSION=2.7 TESTCMD=" -vv --with-timer --with-coverage --cover-package=pymc3 pymc3.tests.test_distributions_random"
19-
- PYTHON_VERSION=3.6 TESTCMD=" -vv --with-timer --with-coverage --cover-package=pymc3 -e test_examples -e test_distributions"
20-
- PYTHON_VERSION=3.6 TESTCMD=" -vv --with-timer --with-coverage --cover-package=pymc3 pymc3.tests.test_distributions pymc3.tests.test_examples"
21-
- PYTHON_VERSION=3.6 TESTCMD=" -vv --with-timer --with-coverage --cover-package=pymc3 pymc3.tests.test_distributions_random"
15+
- PYTHON_VERSION=2.7 TESTCMD="--durations=10 --ignore=pymc3/tests/test_examples.py --cov-append --ignore=pymc3/tests/test_distributions_random.py --ignore=pymc3/tests/test_variational_inference.py --ignore=pymc3/tests/test_shared.py --ignore=pymc3/tests/test_smc.py"
16+
- PYTHON_VERSION=2.7 RUN_PYLINT="true" TESTCMD="--durations=10 --cov-append pymc3/tests/test_distributions_random.py pymc3/tests/test_shared.py pymc3/tests/test_smc.py"
17+
- PYTHON_VERSION=2.7 TESTCMD="--durations=10 --cov-append pymc3/tests/test_examples.py pymc3/tests/test_variational_inference.py"
18+
- PYTHON_VERSION=3.6 TESTCMD="--durations=10 --cov-append --ignore=pymc3/tests/test_examples.py --ignore=pymc3/tests/test_distributions_random.py --ignore=pymc3/tests/test_variational_inference.py --ignore=pymc3/tests/test_shared.py --ignore=pymc3/tests/test_smc.py"
19+
- PYTHON_VERSION=3.6 TESTCMD="--durations=10 --cov-append pymc3/tests/test_distributions_random.py pymc3/tests/test_shared.py pymc3/tests/test_smc.py"
20+
- PYTHON_VERSION=3.6 TESTCMD="--durations=10 --cov-append pymc3/tests/test_examples.py pymc3/tests/test_variational_inference.py"
2221
script:
2322
- . ./scripts/test.sh $TESTCMD
2423

CONTRIBUTING.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,16 @@ We recommended that your contribution complies with the following guidelines bef
7474

7575
* Documentation and high-coverage tests are necessary for enhancements to be accepted.
7676

77+
* Run any of the pre-existing examples in ``docs/source/notebooks`` that contain analyses that would be affected by your changes to ensure that nothing breaks. This is a useful opportunity to not only check your work for bugs that might not be revealed by unit test, but also to show how your contribution improves PyMC3 for end users.
78+
7779
You can also check for common programming errors with the following
7880
tools:
7981

80-
* Code with good unittest **coverage** (at least 80%), check with:
82+
* Code with good test **coverage** (at least 80%), check with:
8183

8284
```bash
83-
$ pip install nose coverage
84-
$ nosetests --with-coverage path/to/tests_for_package
85+
$ pip install pytest pytest-cov coverage
86+
$ pytest --cov=pymc3 pymc3/tests/tests_for_package.py
8587
```
8688

8789
* No `pyflakes` warnings, check with:
@@ -110,9 +112,12 @@ tools:
110112
We have provided a Dockerfile which helps for isolating build problems, and local development.
111113
Install [Docker](https://www.docker.com/) for your operating system, clone this repo, then
112114
run `./scripts/start_container.sh`. This should start a local docker container called `pymc3`,
113-
as well as a [`jupyter`](http://jupyter.org/) notebook server running on port 8888. You will have to open
114-
a browser at `localhost:8888`. The repo will be running the code from your local copy of `pymc3`,
115-
so it is good for development. You may also use it to run the test suite, with
115+
as well as a [`jupyter`](http://jupyter.org/) notebook server running on port 8888. The
116+
notebook should be opened in your browser automatically (you can disable this by passing
117+
`--no-browser`). The repo will be running the code from your local copy of `pymc3`,
118+
so it is good for development. To find the token necessary to access the notebooks, run
119+
120+
You may also use it to run the test suite, with
116121

117122
```bash
118123
$ docker exec -it pymc3 bash # logon to the container
@@ -122,6 +127,13 @@ $ . ./scripts/test.sh # takes a while!
122127

123128
This should be quite close to how the tests run on TravisCI.
124129

130+
If the container was started without opening the browser, you
131+
need the a token to work with the notebook. This token can be
132+
access with
133+
134+
```
135+
docker exec -it pymc3 jupyter notebook list
136+
```
125137

126138
## Style guide
127139

MANIFEST.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
recursive-include pymc3/examples/data *
22
recursive-include source *
3+
recursive-include docs *
34
include requirements.txt
45
include *.md *.rst
5-
6+
include scripts/*.sh

README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Getting started
4646
- `PyMC3 port of the models presented in the book "Doing Bayesian Data
4747
Analysis" by John
4848
Kruschke <https://github.com/aloctavodia/Doing_bayesian_data_analysis>`__
49+
- `PyMC3 port of the models presented in the book "Bayesian Cognitive Modeling" by Michael Lee and EJ Wagenmakers <https://github.com/junpenglao/Bayesian-Cognitive-Modeling-in-Pymc3>`__
4950
- `Coyle P. (2016) Probabilistic programming and PyMC3. European Scientific Python Conference 2015 (Cambridge, UK) <http://adsabs.harvard.edu/abs/2016arXiv160700379C>`__
5051
- `Bayesian Analysis with Python by Osvaldo Martin <https://www.packtpub.com/big-data-and-business-intelligence/bayesian-analysis-python>`__ (and `errata <https://github.com/aloctavodia/BAP>`__)
5152

RELEASE-NOTES.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,31 @@
44

55
### New features
66

7-
* Experimental GPU support.
7+
* [Add Gaussian Process submodule](http://pymc-devs.github.io/pymc3/notebooks/GP-introduction.html)
88

9-
* Gaussian Process support.
9+
* Many optimizations and speed-ups.
10+
11+
* NUTS implementation now matches current Stan implementation.
12+
13+
* Add higher-order integrators for HMC.
14+
15+
* [Add sampler statistics.](http://pymc-devs.github.io/pymc3/notebooks/sampler-stats.html)
16+
17+
* [Add live-trace to see samples in real-time.](http://pymc-devs.github.io/pymc3/notebooks/live_sample_plots.html)
18+
19+
* ADVI stopping criterion implemented.
20+
21+
* Improved support for theano's floatX setting to enable GPU computatiosn (experimental).
22+
23+
* MvNormal supports Cholesky Decomposition now for increased speed and numerical stability.
24+
25+
* [Add Elliptical Slice Sampler.](http://pymc-devs.github.io/pymc3/notebooks/GP-slice-sampling.html)
26+
27+
* Add Stein-Variational Gradient Descent (experimental).
28+
29+
* [Add Operator Variational Inference (experimental).](http://pymc-devs.github.io/pymc3/notebooks/bayesian_neural_network_opvi-advi.html).
30+
31+
* [Add pm.generator() to easily specify mini-batches.](http://pymc-devs.github.io/pymc3/notebooks/bayesian_neural_network_opvi-advi.html#Minibatch-ADVI)
1032

1133
* `Model` can now be inherited from and act as a base class for user specified models (see pymc3.models.linear).
1234

@@ -16,6 +38,8 @@
1638

1739
* GLM models do not need a left-hand variable anymore.
1840

41+
* Add support for cholesky parametrizations for cov/corr matrices.
42+
1943
* Refactored HMC and NUTS for better readability.
2044

2145
* Add support for Python 3.6.

0 commit comments

Comments
 (0)