Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug #2585 : Multitask GP Regression fails for LeaveOneOutPseudoLikelihood mll #2586

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sahakpetros
Copy link

fix bug 2585 #2585

@sahakpetros sahakpetros changed the title fix bug #2585 fix bug #2585 : Multitask GP Regression fails for LeaveOneOutPseudoLikelihood mll Sep 12, 2024
@@ -54,6 +54,7 @@ def forward(self, function_dist: MultivariateNormal, target: Tensor, *params) ->
:param torch.Tensor target: :math:`\mathbf y` The target values
:param dict kwargs: Additional arguments to pass to the likelihood's forward function.
"""
target = target.flatten()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will cause errors if target is a batch of targets.

Please also add unit tests, covering both the batch and the non-batch case. Ideally, your tests should catch the error that you are trying to fix. I.e. you should have unit tests that fail before you add your code change, but pass after you add your code change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants