Skip to content

Commit

Permalink
Test against prod environment (#2082)
Browse files Browse the repository at this point in the history
  • Loading branch information
uri-granta authored Aug 8, 2023
1 parent 35fe336 commit cd9d49c
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 1 deletion.
73 changes: 73 additions & 0 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"
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.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.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 @@ -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
1 change: 1 addition & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 57,7 @@ This release contains contributions from:
## 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

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_method_equivalence.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 213,7 @@ def optimize(model: GPModel) -> None:
approximate_kernel_ls = approximate_model.kernel.lengthscales.numpy()
approximate_kernel_var = approximate_model.kernel.variance.numpy()

assert_allclose(gpr_kernel_ls, approximate_kernel_ls, 1e-4)
assert_allclose(gpr_kernel_ls, approximate_kernel_ls, 2e-4)
assert_allclose(gpr_kernel_var, approximate_kernel_var, 1e-3)

gpr_mu, gpr_var = gpr_model.predict_y(Datum.Xtest)
Expand Down

0 comments on commit cd9d49c

Please sign in to comment.