pytorch / botorch

Bayesian optimization in PyTorch
https://botorch.org/
MIT License
3.11k stars 406 forks source link

Remove `as_tensor argument` of `set_tensors_from_ndarray_1d` #2615

Closed AVHopp closed 2 weeks ago

AVHopp commented 2 weeks ago

Motivation

This PR removes the as_tensor argument of the set_tensors_from_ndarray_1d function in numpy_utils.py.

The reason for this change is that the previous implementation

This change was discussed previously with @Balandat and @esantorella in #2596 .

Have you read the Contributing Guidelines on pull requests?

Yes, I have read it.

Test Plan

I checked the format using ufmt format . and verified that all tests are still running using pytest -ra.

Related PRs

This PR is related to #2597 and #2596, fixing a similar issue (float32 being broken by some internal calculations).

codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.98%. Comparing base (3ca48d0) to head (c49de8f). Report is 2 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2615 +/- ## ========================================== - Coverage 99.98% 99.98% -0.01% ========================================== Files 196 196 Lines 17372 17358 -14 ========================================== - Hits 17370 17356 -14 Misses 2 2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

facebook-github-bot commented 2 weeks ago

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

facebook-github-bot commented 2 weeks ago

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

facebook-github-bot commented 2 weeks ago

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

facebook-github-bot commented 2 weeks ago

@saitcakmak merged this pull request in pytorch/botorch@81c16ffcb62d6cf0c597d13d6642400c004e7ae3.