From 4a537085226d7c64ba1340e5661ab69522020255 Mon Sep 17 00:00:00 2001 From: Jason Chow Date: Mon, 16 Dec 2024 13:59:48 -0800 Subject: [PATCH] Allow monotonic rejection GP to initialize its inducing point allocator from config. (#485) Summary: Pull Request resolved: https://github.com/facebookresearch/aepsych/pull/485 Monotonic rejection GP used to completely ignore any inducing point config, now it follows other models. Reviewed By: crasanders Differential Revision: D67225873 fbshipit-source-id: 843d4a129e81ac8b2f3fb4b3b63e6d24bd51e3a5 --- aepsych/models/monotonic_rejection_gp.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/aepsych/models/monotonic_rejection_gp.py b/aepsych/models/monotonic_rejection_gp.py index de61f9468..6673288bd 100644 --- a/aepsych/models/monotonic_rejection_gp.py +++ b/aepsych/models/monotonic_rejection_gp.py @@ -96,12 +96,9 @@ def __init__( dim=self.dim ) - # TODO: This allocator *must* be SobolAllocator and not the set one. This - # suggests that this model doesn't actually properly use data for inducing - # points properly. - inducing_points = SobolAllocator( - bounds=torch.stack([lb, ub]), dim=self.dim - ).allocate_inducing_points(num_inducing=self.inducing_size) + inducing_points = self.inducing_point_method.allocate_inducing_points( + num_inducing=self.inducing_size + ) inducing_points_aug = self._augment_with_deriv_index(inducing_points, 0) variational_distribution = CholeskyVariationalDistribution(