Skip to content

Fix lazy kernel slicing when there are multiple outputs #2376

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

Merged
merged 7 commits into from
Jul 19, 2023

Conversation

douglas-boubert
Copy link
Contributor

Fixes a bug when slicing a lazy kernel and the number of outputs per row or column is greater than one.

The master implementation incorrectly checks to see if x1 and x2 are both slices. This always fails and defaults to the super method.

This PR fixes that check to ensure that row_index and col_index are slices.

The changes on the other lines are necessary to catch situations where the start point or end point of the slicing is implicit.

Copy link
Collaborator

@Balandat Balandat left a comment

Choose a reason for hiding this comment

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

Great, thanks for the fix. Would you be able to add a unit test for this behavior as well?

@douglas-boubert
Copy link
Contributor Author

@Balandat, thanks for the review! I've simplified the None start/stop filling and added a unittest that covers the behaviour.

@Balandat
Copy link
Collaborator

Looks like the linter / code formatter is unhappy, other than that this lgtm

@douglas-boubert
Copy link
Contributor Author

Looks like the linter / code formatter is unhappy, other than that this lgtm

Ah, sorry for that! I've run ufmt on both files I touched and pushed the changes.

@Balandat Balandat merged commit 938d4f9 into cornellius-gp:master Jul 19, 2023
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