Fixed mean_cache
data extraction for dKG
#2452
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 ofmean_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 pytorch/botorch#2137