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

Add dtype torch.double to basic example on website #2395

Closed
wants to merge 3 commits into from

Conversation

jduerholt
Copy link
Contributor

Motivation

By chance, I encountered that there is no explicit dtype provided in the basic example on the botorch website, which then throws a warning when running the code, which I find kind of annoying. This PR just adds dtype=torch.double to the example, as it is also done for somehow the same code example in the README.md on github.

Have you read the Contributing Guidelines on pull requests?

Yes.

Test Plan

No additional tests needed.

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Jun 26, 2024
@@ -19,8 +19,8 @@ const bash = (...args) => `~~~bash\n${String.raw(...args)}\n~~~`;

class HomeSplash extends React.Component {
render() {
const {siteConfig, language = ''} = this.props;
const {baseUrl, docsUrl} = siteConfig;
const { siteConfig, language = '' } = this.props;
Copy link
Member

Choose a reason for hiding this comment

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

What happened here? An auto-formatter?

Copy link
Member

Choose a reason for hiding this comment

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

I don't think the whitespace matters, but I'll revert this for extra safety.

@esantorella esantorella self-assigned this Jun 26, 2024
Copy link

codecov bot commented Jun 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.98%. Comparing base (fac5faa) to head (8156158).

Current head 8156158 differs from pull request most recent head 436d6b8

Please upload reports for the commit 436d6b8 to get more accurate results.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2395   +/-   ##
=======================================
  Coverage   99.98%   99.98%           
=======================================
  Files         191      191           
  Lines       16715    16715           
=======================================
  Hits        16712    16712           
  Misses          3        3           

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

@esantorella
Copy link
Member

Thanks so much for this. Some of the documentation is older and has fallen out of step with currently recommended best practices, so I really appreciate this -- failing to use double precision is a common "gotcha."

@facebook-github-bot
Copy link
Contributor

@esantorella has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@esantorella has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@Balandat
Copy link
Contributor

Thanks!

@facebook-github-bot
Copy link
Contributor

@esantorella merged this pull request in ef73ea6.

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. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants