Skip to content

Add FOBO Tutorial - #2137

Open
yyexela wants to merge 1 commit into
meta-pytorch:mainfrom
yyexela:main
Open

Add FOBO Tutorial#2137
yyexela wants to merge 1 commit into
meta-pytorch:mainfrom
yyexela:main

Conversation

@yyexela

@yyexela yyexela commented Dec 3, 2023

Copy link
Copy Markdown
Contributor

Motivation

Add tutorial utilizing dKG and dNEI for dGP functionality.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

N/A (notebook runs without issues).

Related PRs

#1679

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Dec 3, 2023
@Balandat

Balandat commented Dec 3, 2023

Copy link
Copy Markdown
Contributor

Where can I see the versions of the packages installed for the smoke test? I was able to run my notebook just fine locally with a fresh conda environment and latest package versions, but got an error in my PR...

The job is defined here: https://github.com/pytorch/botorch/blob/main/.github/workflows/tutorials_smoke_test_on_pr.yml#L10-L17, so you'll see that this will run against the latest changes on the main / primary branch of pytorch/gpytorch/botorch: https://github.com/pytorch/botorch/blob/main/.github/workflows/reusable_tutorials.yml#L53-L55

Can you see the logs here: https://github.com/pytorch/botorch/actions/runs/7079121747/job/19265397371?pr=2137 ? The setup stages show the logs including which packages are installed (assuming there isn't any permissions issue with viewing the full logs).

@Balandat

Balandat commented Dec 4, 2023

Copy link
Copy Markdown
Contributor

I wonder if this could be related to some of @sdaulton's recent changes, e.g. #2011 ?

@yyexela

yyexela commented Dec 4, 2023

Copy link
Copy Markdown
Contributor Author

That doesn't appear to be the case for me, it looks like it's a result of this PR from GPyTorch (cornellius-gp/gpytorch#2288) which changes the shapes of some objects (in particular, mean_cache, which used to be size [5,1,1,44] to [5,5,5,44]).

My code runs on the commit just before that one, using the latest BoTorch commit, but breaks when using the commit from the PR (cornellius-gp/gpytorch#2288).

@yyexela

yyexela commented Dec 4, 2023

Copy link
Copy Markdown
Contributor Author

This change in particular is where I think the issue is:
cornellius-gp/gpytorch@981edd8#diff-2c80c12a0a4206c9d43cd7be2a12f5c8709a4229fcf28eea27836078b0bc24f9L306-R342

@yyexela

yyexela commented Dec 4, 2023

Copy link
Copy Markdown
Contributor Author

Ok, so I got it working locally, I changed

mean_cache = mean_cache.squeeze(1)

to

mean_cache = mean_cache.permute(2,0,1,3)[:,0:1,0,:]

and it works as before. This extracts the relevant dimensions to match what was previously working. I verified heuristically that the dimensions I got rid of were copies of one another, so we keep the relevant data. I'm not sure why caused the shape of mean_cache went from [5,1,1,4] to [5,5,5,4], in the first place (maybe from #2011, like you mentioned ?), but I just put in a PR in GPyTorch for this change for now. Hopefully those tests pass... lol

EDIT: Unit tests aren't passing but neither are the ones in main for GPyTorch, so I'll assume this change is what's needed for now. (link: cornellius-gp/gpytorch#2452)

@yyexela

yyexela commented Jan 19, 2024

Copy link
Copy Markdown
Contributor Author

Any updates on how to get this through? I had someone reach out to me today because they ran into the same issue (yyexela@a39e6f5#commitcomment-137448122). I believe all we need is for (cornellius-gp/gpytorch#2452) to merge.

Thanks!

@yyexela

yyexela commented Jan 19, 2024

Copy link
Copy Markdown
Contributor Author

@Balandat

@saitcakmak

Copy link
Copy Markdown
Contributor

Hi @yyexela . Thanks for the tutorial! I requested a review on the GPyTorch PR, hopefully someone will get to it soon. We're trying out a new support model for community contributions: https://github.com/pytorch/botorch/blob/main/CONTRIBUTING.md#community-contributions-beta. Once the GPyTorch fix lands, can you move the tutorial to the notebooks_community directory and add the contributor info and other metadata as outlined in the readme file? Thanks!

@saitcakmak

Copy link
Copy Markdown
Contributor

Closing this due to inactivity. Feel free to re-open!

@saitcakmak saitcakmak closed this Jan 9, 2026
@codecov

codecov Bot commented Jan 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.98%. Comparing base (504ccea) to head (a39e6f5).
⚠️ Report is 771 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2137   +/-   ##
=======================================
  Coverage   99.98%   99.98%           
=======================================
  Files         181      181           
  Lines       16243    16243           
=======================================
  Hits        16240    16240           
  Misses          3        3           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yyexela

yyexela commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

Opening this up again @saitcakmak there's clearly a community that wants dGP functionality, and having this tutorial and the associated PR in gpytorch merged (cornellius-gp/gpytorch#2452) will help people avoid running into unnecessary errors. Any way you can help get both these through?

@yyexela

yyexela commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

(I would like to open this, apparently I can't haha)

@saitcakmak saitcakmak reopened this Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Do not delete this pull request or issue due to inactivity.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants