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 warning in test_normalize #1876

Closed
wants to merge 5 commits into from

Conversation

Balandat
Copy link
Contributor

@Balandat Balandat commented Jun 8, 2023

Return the proper type of indices in get_init_args() for Normalize. This would cause the following warning:

botorch/models/transforms/input.py:362: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
    indices = torch.tensor(indices, dtype=torch.long)

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Jun 8, 2023
@facebook-github-bot
Copy link
Contributor

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

@codecov
Copy link

codecov bot commented Jun 8, 2023

Codecov Report

Merging #1876 (e03eb08) into main (6d329a8) will not change coverage.
The diff coverage is 100.00%.

❗ Current head e03eb08 differs from pull request most recent head d162feb. Consider uploading reports for the commit d162feb to get more accurate results

@@            Coverage Diff            @@
##              main     #1876   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          172       172           
  Lines        15093     15093           
=========================================
  Hits         15093     15093           
Impacted Files Coverage Δ
botorch/models/transforms/input.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

@Balandat merged this pull request in f00057b.

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.

2 participants