cornellius-gp / gpytorch

A highly efficient implementation of Gaussian Processes in PyTorch
MIT License
3.46k stars 546 forks source link

Fixed `mean_cache` data extraction for dKG #2452

Open yyexela opened 7 months ago

yyexela commented 7 months ago

Issue: dKG in BoTorch no longer works since I last ran it a few months ago. It appears to be from the mean_cache going from size [num_fantasies, 1, 1, num_data] to [num_fantasies, num_fantasies, num_fantasies, num_data]. What this change does is extract the relevant data of mean_cache while keeping the expected shape for the rest of the code (ie. [num_fantasies, 1, num_data]).

Not sure about a unit test for this since it depends on having BoTorch's qKnowledgeGradient class, among other dependencies.

See https://github.com/pytorch/botorch/pull/2137

yyexela commented 7 months ago

Any idea why the unit test is failing when there is no code change?

yyexela commented 7 months ago

Noticed main fails the same test so I'm assuming my code works and it's another problem.

EDIT: Unit tests aren't passing but neither are the ones in main, so I'll assume this change is what's needed for now.

CedricTravelletti commented 2 weeks ago

Any news on this PR? I confirm that there is interest in gradient-enabled GPs/BO for several application cases.