Skip to content

Commit

Permalink
Merge branch 'develop' into faster_predict_y
Browse files Browse the repository at this point in the history
  • Loading branch information
zhixiaozhu committed Oct 9, 2023
2 parents 086d7e4 + b716d22 commit 0dc06f7
Show file tree
Hide file tree
Showing 30 changed files with 1,046 additions and 106 deletions.
81 changes: 77 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,36 @@ parameters:
min_py_ver:
type: string
default: "3.7"
max_py_ver:
prod_py_ver:
type: string
default: "3.10"
max_py_ver:
type: string
default: "3.11"
min_tf_ver:
type: string
default: "2.4.0"
prod_tf_ver:
type: string
default: "2.8.4"
max_tf_ver:
type: string
default: "2.10.0"
default: "2.12.0"
min_tfp_ver:
type: string
default: "0.12.0"
prod_tfp_ver:
type: string
default: "0.16.0"
max_tfp_ver:
type: string
default: "0.18.0"
default: "0.20.0"
min_venv_dir:
type: string
default: min_venv
prod_venv_dir:
type: string
default: prod_venv
max_venv_dir:
type: string
default: max_venv
Expand Down Expand Up @@ -274,7 +286,7 @@ jobs:
mkdir docs_tmp
python doc/build_docs.py --shard collect <<pipeline.git.branch>> docs_tmp
- add_ssh_keys:
fingerprints: # Add key to give write-access below
fingerprints: # Add key to give write-access below
- "19:0a:d4:e6:43:fa:a4:d3:31:a6:0d:5b:43:05:db:63"
- run:
name: Commit documentation
Expand Down Expand Up @@ -441,6 +453,15 @@ workflows:
filters:
tags:
only: /^v[0-9]+(\.[0-9]+)*(-rc[0-9]+)?/
- install_gpflow:
name: install_gpflow_prod
py_ver: <<pipeline.parameters.prod_py_ver>>
tf_ver: <<pipeline.parameters.prod_tf_ver>>
tfp_ver: <<pipeline.parameters.prod_tfp_ver>>
venv_dir: <<pipeline.parameters.prod_venv_dir>>
filters:
tags:
only: /^v[0-9]+(\.[0-9]+)*(-rc[0-9]+)?/
- install_gpflow:
name: install_gpflow_max
py_ver: <<pipeline.parameters.max_py_ver>>
Expand All @@ -459,6 +480,15 @@ workflows:
filters:
tags:
only: /^v[0-9]+(\.[0-9]+)*(-rc[0-9]+)?/
- verify-install:
name: verify-install-prod
py_ver: <<pipeline.parameters.prod_py_ver>>
venv_dir: <<pipeline.parameters.prod_venv_dir>>
requires:
- install_gpflow_prod
filters:
tags:
only: /^v[0-9]+(\.[0-9]+)*(-rc[0-9]+)?/
- verify-install:
name: verify-install-max
py_ver: <<pipeline.parameters.max_py_ver>>
Expand All @@ -477,6 +507,15 @@ workflows:
filters:
tags:
only: /^v[0-9]+(\.[0-9]+)*(-rc[0-9]+)?/
- type-check:
name: type-check-prod
py_ver: <<pipeline.parameters.prod_py_ver>>
venv_dir: <<pipeline.parameters.prod_venv_dir>>
requires:
- install_gpflow_prod
filters:
tags:
only: /^v[0-9]+(\.[0-9]+)*(-rc[0-9]+)?/
- type-check:
name: type-check-max
py_ver: <<pipeline.parameters.max_py_ver>>
Expand All @@ -495,6 +534,15 @@ workflows:
filters:
tags:
only: /^v[0-9]+(\.[0-9]+)*(-rc[0-9]+)?/
- format-check:
name: format-check-prod
py_ver: <<pipeline.parameters.prod_py_ver>>
venv_dir: <<pipeline.parameters.prod_venv_dir>>
requires:
- install_gpflow_prod
filters:
tags:
only: /^v[0-9]+(\.[0-9]+)*(-rc[0-9]+)?/
- format-check:
name: format-check-max
py_ver: <<pipeline.parameters.max_py_ver>>
Expand All @@ -514,10 +562,13 @@ workflows:
name: fast-tests
requires:
- verify-install-min
- verify-install-prod
- verify-install-max
- type-check-min
- type-check-prod
- type-check-max
- format-check-min
- format-check-prod
- format-check-max
- docs-test
filters:
Expand All @@ -533,6 +584,16 @@ workflows:
filters:
tags:
only: /^v[0-9]+(\.[0-9]+)*(-rc[0-9]+)?/
- unit-test:
name: unit-test-prod
py_ver: <<pipeline.parameters.prod_py_ver>>
venv_dir: <<pipeline.parameters.prod_venv_dir>>
requires:
- install_gpflow_prod
- fast-tests
filters:
tags:
only: /^v[0-9]+(\.[0-9]+)*(-rc[0-9]+)?/
- unit-test:
name: unit-test-max
py_ver: <<pipeline.parameters.max_py_ver>>
Expand All @@ -553,6 +614,16 @@ workflows:
filters:
tags:
only: /^v[0-9]+(\.[0-9]+)*(-rc[0-9]+)?/
- notebook-test:
name: notebook-test-prod
py_ver: <<pipeline.parameters.prod_py_ver>>
venv_dir: <<pipeline.parameters.prod_venv_dir>>
requires:
- install_gpflow_prod
- fast-tests
filters:
tags:
only: /^v[0-9]+(\.[0-9]+)*(-rc[0-9]+)?/
- notebook-test:
name: notebook-test-max
py_ver: <<pipeline.parameters.max_py_ver>>
Expand All @@ -568,8 +639,10 @@ workflows:
requires:
- fast-tests
- unit-test-min
- unit-test-prod
- unit-test-max
- notebook-test-min
- notebook-test-prod
- notebook-test-max
filters:
tags:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,6 @@ target/

# TensorFlow logs
events.out.tfevents.*

# pyenv
.python-version
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -514,4 +514,4 @@ known-third-party=enchant

# Exceptions that will emit a warning when being caught. Defaults to
# "Exception"
overgeneral-exceptions=Exception
overgeneral-exceptions=builtins.Exception
2 changes: 2 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,7 @@ Because GitHub's [graph of contributors](http://github.com/GPflow/GPflow/graphs/
[@ChrisMorter](https://github.com/ChrisMorter)
[@sethaxen](https://github.com/sethaxen)
[@khurram-ghani](https://github.com/khurram-ghani)
[@partev](https://github.com/partev)
[@uri-granta](https://github.com/uri-granta)

Add yourself when you first contribute to GPflow's code, tests, or documentation!
73 changes: 70 additions & 3 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ This release contains contributions from:
<INSERT>, <NAME>, <HERE>, <USING>, <GITHUB>, <HANDLE>


# Release 2.8.0 (next release)
# Release 2.10.0 (next release)

<INSERT SMALL BLURB ABOUT RELEASE FOCUS AREA AND POTENTIAL TOOLCHAIN CHANGES>

Expand All @@ -50,11 +50,14 @@ This release contains contributions from:

## Major Features and Improvements

* Major rework of documentation landing page and "getting started" section.
* <INSERT MAJOR FEATURE HERE, USING MARKDOWN SYNTAX>
* <IF RELEASE CONTAINS MULTIPLE FEATURES FROM SAME AREA, GROUP THEM TOGETHER>

## Bug Fixes and Other Changes

* Fixed bug related to `tf.saved_model` and methods wrapped in `@check_shapes`.
* <SIMILAR TO ABOVE SECTION, BUT FOR OTHER IMPORTANT CHANGES / BUG FIXES>
* <IF A CHANGE CLOSES A GITHUB ISSUE, IT SHOULD BE DOCUMENTED HERE>
* <NOTES SHOULD BE GROUPED PER AREA>

## Thanks to our Contributors

Expand All @@ -63,6 +66,70 @@ This release contains contributions from:
<INSERT>, <NAME>, <HERE>, <USING>, <GITHUB>, <HANDLE>


# Release 2.9.0

This release adds caching of compiled graphs inside the Scipy optimizer, and adds support
for returning loss history. It also adds supports for Python 3.11.

## Major Features and Improvements

* Support returning loss history with Scipy optimizer.
* Scipy minimize wrapper caches compiled graphs and re-uses them if called with the same arguments.
This functionality can be disabled by setting the new `compile_cache_size` argument to 0.

## Bug Fixes and Other Changes

* Support and test with Python 3.11
* Test against a 'production' environment (in addition to 'min' and 'max' environments).

## Thanks to our Contributors

This release contains contributions from:

khurram-ghani, jesnie, uri-granta


# Release 2.8.1

A small fix to ensure support for (and testing with) TensorFlow 2.12.

## Bug Fixes and Other Changes

* Support and test with TensorFlow 2.12

## Thanks to our Contributors

This release contains contributions from:

uri-granta


# Release 2.8.0

The main focus of this release is to provide users control over arguments for `tf.function`
compilation inside the Scipy minimize wrapper. It also adds support for a new categorical kernel.

## Major Features and Improvements

* Added a new categorical kernel that implements categorical variables by mapping them to values in
a latent space. (#2055)
* Added support for passing `tf.function` arguments for compilation in `gpflow.optimizers.Scipy`.
(#2064)
* Default lower bound for parameters of scalar likelihoods can now be set via configuration.
(#1985, #2066)

## Bug Fixes and Other Changes

* Fixed some notebook typos and a link. (#2052, #2057)
* Fixed missing docs for `SquaredExponential` and `Constant` kernels. (#2056, #2063)

## Thanks to our Contributors

This release contains contributions from:

sc336, partev, khurram-ghani, uri-granta, awav, jesnie


# Release 2.7.1

A small fix for a bug in the scipy optimize wrapper.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.1
2.9.0
23 changes: 15 additions & 8 deletions doc/generate_module_rst.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from dataclasses import dataclass
from pathlib import Path
from types import ModuleType
from typing import Any, Callable, Deque, Dict, List, Mapping, Set, TextIO, Type, Union
from typing import Any, Callable, Deque, Dict, List, Mapping, Set, TextIO, Tuple, Type, Union

from gpflow.utilities import Dispatcher

Expand Down Expand Up @@ -165,17 +165,19 @@ def _should_ignore(child: Union[Callable[..., Any], Type[Any]]) -> bool:

return DocumentableModule(root_name, root, modules, classes, functions)

def seen_in_dispatchers(self, seen: Set[int]) -> None:
def seen_in_dispatchers(self, seen: Set[Tuple[str, int]]) -> None:
for module in self.modules:
module.seen_in_dispatchers(seen)
for function in self.functions:
if isinstance(function, DocumentableDispatcher):
impls = function.obj.funcs.values()
for impl in impls:
seen.add(id(impl))
# See comment below (for classes) about aliases.
key = (impl.__name__, id(impl))
seen.add(key)

def prune_duplicates(self) -> None:
seen: Set[int] = set()
seen: Set[Tuple[str, int]] = set()
self.seen_in_dispatchers(seen)

# Breadth-first search so that we prefer objects with shorter names.
Expand All @@ -185,15 +187,20 @@ def prune_duplicates(self) -> None:

new_classes = []
for c in module.classes:
if id(c.obj) not in seen:
seen.add(id(c.obj))
# Account for objects to have aliases, hence include the object name in the key.
# We want to generate documentation for both the alias and the original object.
key = (c.name[c.name.rfind(".") + 1 :], id(c.obj))
if key not in seen:
seen.add(key)
new_classes.append(c)
module.classes = new_classes

new_functions = []
for f in module.functions:
if id(f.obj) not in seen:
seen.add(id(f.obj))
# See comment above (for classes) about aliases.
key = (f.name[f.name.rfind(".") + 1 :], id(f.obj))
if key not in seen:
seen.add(key)
new_functions.append(f)
module.functions = new_functions

Expand Down
4 changes: 2 additions & 2 deletions doc/sphinx/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
# -- Project information -----------------------------------------------------

project = "GPflow"
copyright = "2022, The GPflow Contributors"
copyright = "2023, The GPflow Contributors"
author = "The GPflow Contributors"

# The full version, including alpha/beta/rc tags
release = "2.7.1"
release = "2.9.0"

# -- General configuration ---------------------------------------------------

Expand Down
4 changes: 4 additions & 0 deletions doc/sphinx/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ explicitly install specific versions of these.
+---------------------+---------------------------------+
| 2.10.* | 0.18.* |
+---------------------+---------------------------------+
| 2.11.* | 0.19.* |
+---------------------+---------------------------------+
| 2.12.* | 0.20.* |
+---------------------+---------------------------------+

Second, a word of warning about new Mac computers. On new Mac machines you will need to install
``tensorflow-macos`` instead of the regular ``tensorflow``.
Expand Down
4 changes: 2 additions & 2 deletions doc/sphinx/notebooks/advanced/multioutput.pct.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@
#
# Here we have two options for $g$:
# 1. The output dimensions of $g$ share the same kernel.
# 1. Each output of $g$ has a separate kernel.
# 2. Each output of $g$ has a separate kernel.
#
#
# In addition, we have two further suboptions for the inducing inputs of $g$:
# 1. The instances of $g$ share the same inducing inputs.
# 1. Each output of $g$ has its own set of inducing inputs.
# 2. Each output of $g$ has its own set of inducing inputs.
#
# The notation is as follows:
# - $X \in \mathbb{R}^{N \times D}$ denotes the input
Expand Down
Loading

0 comments on commit 0dc06f7

Please sign in to comment.