Skip to content

Commit 8a13add

Browse files
MarcusMNoackclaude
andcommitted
Port to fvgp 4.8.1 (toward gpCAM 8.4.0)
Bump the fvgp pin to ~=4.8.1 and adapt to its breaking API changes: - rename constructor args gp2Scale_dask_client->dask_client and gp2Scale_linalg_mode->linalg_mode; store them privately to avoid fvgp 4.8's new read-only `dask_client` property - remove calc_inv (folded into linalg_mode="CholInv"/"Inv" upstream) - rename update_gp_data/tell kwarg gp_rank_n_update->rank_n_update - update test_gpCAM for renamed fvgp internals (marginal_density-> marginal_likelihood, .KVlinalg->.kv) Sync GPOptimizer/fvGPOptimizer docstrings with fvgp 4.8.1 GP/fvGP (keeping cost_function/logging and optional x_data/y_data), surface new fvgp 4.8 features (validation metrics, bump/sle_kernel, new linalg_mode values) in the API docs, and drop the duplicate-autodoc fvgp_* attribute entries. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 149e725 commit 8a13add

6 files changed

Lines changed: 334 additions & 209 deletions

File tree

docs/source/api/overview.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,21 @@ To get to know gpCAM, check out the [examples](../examples/index.md), download t
2525
repository and look in `./tests`, or visit the project
2626
[website](https://gpcam.lbl.gov/).
2727

28+
## New in fvgp 4.8 (gpCAM 8.4)
29+
30+
Because the optimizers inherit from `fvgp.GP`, the following fvgp 4.8 additions are
31+
available directly on any `GPOptimizer`/`fvGPOptimizer` instance and are listed on the
32+
[gpOptimizer](gpOptimizer.md) / [fvgpOptimizer](fvgpOptimizer.md) pages:
33+
34+
- **Model-validation metrics**`mae`, `mape`, `msll`, `interval_score`, `mpiw`, and
35+
`coverage_curve` for quantifying predictive accuracy and calibration, plus
36+
`plot_observed_vs_predicted` for a quick diagnostic plot.
37+
- **New kernels**`bump` and `sle_kernel` (in addition to the existing library), all
38+
re-exported through `gpcam.kernels` and documented on the [Kernels](kernels.md) page.
39+
- **Linear-algebra modes** — the `linalg_mode` argument now accepts `CholInv`/`Inv`
40+
(the replacement for the removed `calc_inv` option) and preconditioned sparse solvers
41+
such as `sparseCGpre`/`sparseMINRESpre` for large gp2Scale problems.
42+
2843
## See Also
2944

3045
- [Repository](https://github.com/lbl-camera/gpCAM/)

gpcam/autonomous_experimenter.py

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -139,20 +139,6 @@ class AutonomousExperimenterGP:
139139
newly suggested data points will be communicated. The default is False.
140140
compute_device : str, optional
141141
One of `cpu` or `gpu`, determines how linear algebra computations are executed. The default is `cpu`.
142-
calc_inv : bool, optional
143-
If True, the algorithm calculates and stores the inverse of the covariance
144-
matrix after each training or update of the dataset or hyperparameters,
145-
which makes computing the posterior covariance faster (3-10 times).
146-
For larger problems (>2000 data points), the use of inversion should be avoided due
147-
to computational instability and costs. The default is
148-
False. Note, the training will not use the
149-
inverse for stability reasons. Storing the inverse is
150-
a good option when the dataset is not too large and the posterior covariance is heavily used.
151-
Caution: this option, together with `append=True` in `tell()` will mean that the inverse of
152-
the covariance is updated, not recomputed, which can lead to instability.
153-
In application where data is appended many times, it is recommended to either turn
154-
`calc_inv` off, or to regularly force the recomputation of the inverse via `gp_rank_n_update` in
155-
`update_gp_data`.
156142
training_dask_client : distributed.client.Client, optional
157143
A Dask Distributed Client instance for distributed training. If None is provided, a new
158144
`dask.distributed.Client` instance is constructed.
@@ -198,11 +184,10 @@ def __init__(self,
198184
x_data=None, y_data=None, noise_variances=None, dataset=None,
199185
communicate_full_dataset=False,
200186
compute_device="cpu",
201-
calc_inv=False,
202187
training_dask_client=None,
203188
acq_func_opt_dask_client=None,
204189
gp2Scale=False,
205-
gp2Scale_dask_client=None,
190+
dask_client=None,
206191
gp2Scale_batch_size=10000,
207192
ram_economy=True,
208193
args=None
@@ -337,20 +322,6 @@ class AutonomousExperimenterFvGP(AutonomousExperimenterGP):
337322
newly suggested data points will be communicated. The default is False.
338323
compute_device : str, optional
339324
One of `cpu` or `gpu`, determines how linear algebra computations are executed. The default is `cpu`.
340-
calc_inv : bool, optional
341-
If True, the algorithm calculates and stores the inverse of the covariance
342-
matrix after each training or update of the dataset or hyperparameters,
343-
which makes computing the posterior covariance faster (3-10 times).
344-
For larger problems (>2000 data points), the use of inversion should be avoided due
345-
to computational instability and costs. The default is
346-
False. Note, the training will not use the
347-
inverse for stability reasons. Storing the inverse is
348-
a good option when the dataset is not too large and the posterior covariance is heavily used.
349-
Caution: this option, together with `append=True` in `tell()` will mean that the inverse of
350-
the covariance is updated, not recomputed, which can lead to instability.
351-
In application where data is appended many times, it is recommended to either turn
352-
`calc_inv` off, or to regularly force the recomputation of the inverse via `gp_rank_n_update` in
353-
`update_gp_data`.
354325
training_dask_client : distributed.client.Client, optional
355326
A Dask Distributed Client instance for distributed training. If None is provided, a new
356327
`dask.distributed.Client` instance is constructed.
@@ -396,11 +367,10 @@ def __init__(self,
396367
x_data=None, y_data=None, noise_variances=None, dataset=None,
397368
communicate_full_dataset=False,
398369
compute_device="cpu",
399-
calc_inv=False,
400370
training_dask_client=None,
401371
acq_func_opt_dask_client=None,
402372
gp2Scale=False,
403-
gp2Scale_dask_client=None,
373+
dask_client=None,
404374
gp2Scale_batch_size=10000,
405375
ram_economy=True,
406376
args=None

0 commit comments

Comments
 (0)