Revision f3c511060ce62072a34a50319237d28b82d10448 authored by Vincent Dutordoir on 27 August 2020, 11:22:49 UTC, committed by GitHub on 27 August 2020, 11:22:49 UTC
* Update pull request template (#1510)

Clarify template to make it easier for contributors to fill in relevant information.

* Temporary workaround for tensorflow_probability dependency issue (#1522)

* pin cloudpickle==1.3.0 as temporary workaround for tensorflow/probability#991 to unblock our build (to be reverted once fixed upstream)

* Update readme with new project using GPflow (#1530)

* fix bug in varying_noise notebook (#1526)

* Fix formatting in docs ( and restore link removed by #1498 (#1520)

* pin tensorflow<2.3 tensorflow-probability<0.11 (#1537)

* Quadrature Refactoring (#1505)

* WIP: quadrature refactoring

* Removing old ndiagquad code

* deleted test code

* formatting and type-hint

* merge modules

* black formatting

* formatting

* solving failing tests

* fixing failing tests

* fixes

* adapting tests for new syntax, keeping numerical behavior

* black formatting

* remove printf

* changed code for compiled tf compatibility

* black

* restored to original version

* undoing changes

* renaming

* renaming

* renaming

* reshape kwargs

* quadrature along axis=-2, simplified broadcasting

* black

* docs

* docs

* helper function

* docstrings and typing

* added new and old quadrature equivalence tests

* black

* Removing comments

Co-authored-by: Vincent Dutordoir <>

* Typo

Co-authored-by: Vincent Dutordoir <>

* notation

Co-authored-by: Vincent Dutordoir <>

* reshape_Z_dZ return docstring fix

* FIX: quad_old computed with the ndiagquad_old

Co-authored-by: Vincent Dutordoir <>

* more readable implementation

Co-authored-by: Vincent Dutordoir <>

* tf.ensure_shape added

* removed ndiagquad

* removed ndiagquad

* Revert "removed ndiagquad"

This reverts commit 7bb0e9f1e0f2b0e225a2b8a5b3092c4c2f24ba91.

* FIX: shape checking of dZ

* Revert "removed ndiagquad"

This reverts commit 8e235241a697696e361158c30ff9aa9b4cc69f8a.

Co-authored-by: Gustavo Carvalho <>
Co-authored-by: ST John <>
Co-authored-by: Vincent Dutordoir <>

* Add base_conditional_with_lm function (#1528)

* Added base_conditional_with_lm function, which accepts Lm instead of Kmm

Co-authored-by: Neil Ferguson <>
Co-authored-by: Vincent Dutordoir <>
Co-authored-by: st-- <>

* Fixed separate_independent_conditional to correctly handle q_sqrt=None. (#1533)

* Fixed separate_independent_conditional to correctly handle q_sqrt=None.

Co-authored-by: Aidan Scannell <>
Co-authored-by: st-- <>

* Bump version numbers to 2.1.0. (#1544)

* Re-introduce pytest-xdist (#1541)

Enables pytest-xdist for locally running tests (`make test`) on multiple cores in parallel.

* check dependency versions are valid on CI (#1536)

* Update to not use custom image (#1545)

* Update to not use custom image

* Add test requirements

* Update parameter to be savable (#1518)

* Fix for quadrature failure mode when autograph was set to False (#1548)

* Fix and test

* Change shape of quadrature tensors for better broadcasting (#1542)

* using the first dimension to hold the quadrature summation

* adapting ndiagquad wrapper

* Changed bf for bX in docstrings

Co-authored-by: Gustavo Carvalho <>
Co-authored-by: st-- <>
Co-authored-by: Vincent Dutordoir <>

* Update min TFP supported version to 0.10 (#1551)

* Broadcasting constant and zero mean function (#1550)

* Broadcasting constant and zero mean function

* Use rank instead of ndim

Co-authored-by: st-- <>
Co-authored-by: joelberkeley-pio <>
Co-authored-by: gustavocmv <>
Co-authored-by: Gustavo Carvalho <>
Co-authored-by: ST John <>
Co-authored-by: Neil Ferguson <>
Co-authored-by: Neil Ferguson <>
Co-authored-by: Aidan Scannell <>
Co-authored-by: Aidan Scannell <>
Co-authored-by: Sandeep Tailor <>
Co-authored-by: Artem Artemev <>
1 parent acaccfd
Raw File
<div style="text-align:center">
<img width="500" height="200" src="./doc/source/_static/gpflow_logo.svg">

[![Coverage Status](](
[![Documentation Status](](
[![Slack Status](](

[Website]( |
[Documentation (release)]( |
[Documentation (develop)]( |

GPflow is a package for building Gaussian process models in Python, using [TensorFlow](
It was originally created by [James Hensman]( and [Alexander G. de G. Matthews](
It is now actively maintained by (in alphabetical order)
[Alexis Boukouvalas](,
[Artem Artemev](,
[Eric Hambro](,
[James Hensman](,
[Joel Berkeley](,
[Mark van der Wilk](,
[ST John](,
and [Vincent Dutordoir](
GPflow would not be the same without the community. **We are grateful to [all contributors]( who have helped shape GPflow.**
 *GPflow is an open source project. If you have relevant skills and are interested in contributing then please do contact us (see ["The GPflow community" section](#the-gpflow-community) below).*

## What does GPflow do?

GPflow implements modern Gaussian process inference for composable kernels and likelihoods. The [online documentation (develop)]([(master)]( contains more details.

GPflow 2.0 uses [TensorFlow 2.1+]( for running computations, which allows fast execution on GPUs, and uses Python ≥ 3.6.

## Install GPflow 2

### Latest release from PyPI

pip install gpflow

The current release, 2.0.0, requires TensorFlow ≥ 2.1 and TensorFlow Probability ≥ 0.9.

### Latest source from GitHub

*Be aware that the `develop` branch may change regularly, and new commits may break your code.*

In a check-out of the `develop` branch of the [GPflow GitHub repository](, run
pip install -e .

Alternatively, you can install the latest GitHub `develop` version using `pip`:
pip install git+
This will automatically install all required dependencies.

## Install the last GPflow version compatible with TensorFlow 1:

*We have stopped development and support for GPflow based on TensorFlow 1.x.*

The latest available release is [v1.5.1]( [Documentation]( and [tutorials]( will remain available.

## Getting Started with GPflow 2.0

There is an ["Intro to GPflow 2.0"]( Jupyter notebook; check it out for details.
To convert your code from GPflow 1 check the [GPflow 2 upgrade guide](

## The GPflow Community

### Getting help

**Bugs, feature requests, pain points, annoying design quirks, etc:**
Please use [GitHub issues]( to flag up bugs/issues/pain points, suggest new features, and discuss anything else related to the use of GPflow that in some sense involves changing the GPflow code itself.
You can make use of the [labels]( such as [`bug`](, [`discussion`](, [`feature`](, [`feedback`](, etc.
We positively welcome comments or concerns about usability, and suggestions for changes at any level of design.

We aim to respond to issues promptly, but if you believe we may have forgotten about an issue, please feel free to add another comment to remind us.

**"How-to-use" questions:**
Please use [Stack Overflow (gpflow tag)]( to ask questions that relate to "how to use GPflow", i.e. questions of understanding rather than issues that require changing GPflow code. (If you are unsure where to ask, you are always welcome to open a GitHub issue; we may then ask you to move your question to Stack Overflow.)

### Slack workspace

We have a public [GPflow slack workspace]( Please use this [invite link]( if you'd like to join, whether to ask short informal questions or to be involved in the discussion and future development of GPflow.

### Contributing

All constructive input is gratefully received. For more information, see the [notes for contributors](

### Projects using GPflow

A few projects building on GPflow and demonstrating its usage are listed below.

*Note that the new GPflow 2.0 release was published on 31 March 2020. The projects listed below have not been checked for compatibility with the 2.0 branch, and it is up to their authors whether they will upgrade to GPflow 2.0. We encourage all projects to upgrade, as GPflow 2.0 contains numerous improvements on GPflow 1.*

| Project | Description |
| --- | --- |
| [GPflowOpt](       | Bayesian Optimization using GPflow. |
| [VFF](       | Variational Fourier Features for Gaussian Processes. |
| [Doubly-Stochastic-DGP](| Deep Gaussian Processes with Doubly Stochastic Variational Inference.|
| [BranchedGP]( | Gaussian processes with branching kernels.|
| [heterogp]( | Heteroscedastic noise for sparse variational GP. |
| [widedeepnetworks]( | Measuring the relationship between random wide deep neural networks and GPs.| 
| [orth_decoupled_var_gps]( | Variationally sparse GPs with orthogonally decoupled bases| 
| [kernel_learning]( | Implementation of "Differentiable Compositional Kernel Learning for Gaussian Processes".|
| [VBPP]( | Implementation of "Variational Bayes for Point Processes".|
| [DGPs_with_IWVI]( | Deep Gaussian Processes with Importance-Weighted Variational Inference|
| [kerndisc]( | Library for automated kernel structure discovery in univariate data|
| [Gaussian Process Regression on Molecules]( | GPs to predict molecular properties by creating a custom-defined Tanimoto kernel to operate on Morgan fingerprints |

If you would like your project listed here, let us know - or simply [open a pull request]( that adds your project to the table above!

## Compatibility

GPflow heavily depends on TensorFlow and as far as TensorFlow supports forward compatibility, GPflow should as well. The version of GPflow can give you a hint about backward compatibility. If the major version has changed then you need to check the release notes to find out how the API has been changed.

Unfortunately, there is no such thing as backward compatibility for GPflow _models_, which means that a model implementation can change without changing interfaces. In other words, the TensorFlow graph can be different for the same models from different versions of GPflow.

## Citing GPflow

To cite GPflow, please reference the [JMLR paper]( Sample Bibtex is given below:

  author = {Matthews, Alexander G. de G. and {van der Wilk}, Mark and Nickson, Tom and
	Fujii, Keisuke. and {Boukouvalas}, Alexis and {Le{\'o}n-Villagr{\'a}}, Pablo and
	Ghahramani, Zoubin and Hensman, James},
    title = "{{GP}flow: A {G}aussian process library using {T}ensor{F}low}",
  journal = {Journal of Machine Learning Research},
  year    = {2017},
  month = {apr},
  volume  = {18},
  number  = {40},
  pages   = {1-6},
  url     = {}

Since the publication of the GPflow paper, the software has been significantly extended
with the framework for interdomain approximations and multioutput priors. We review the
framework and describe the design in an [arXiv paper](,
which can be cited by users.

  author = {{van der Wilk}, Mark and Dutordoir, Vincent and John, ST and
            Artemev, Artem and Adam, Vincent and Hensman, James},
  title = {A Framework for Interdomain and Multioutput {G}aussian Processes},
  year = {2020},
  journal = {arXiv:2003.01115},
  url = {}
back to top