pytorch / botorch

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

Use log1p(x) instead of log(1+x) #2539

Closed kit1980 closed 2 months ago

kit1980 commented 2 months ago

This function is more accurate than torch.log() for small values of input - https://pytorch.org/docs/stable/generated/torch.log1p.html

Found with https://github.com/pytorch-labs/torchfix/

codecov[bot] commented 2 months ago

Codecov Report

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

Project coverage is 99.98%. Comparing base (e9ce11f) to head (fa485ea). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2539 +/- ## ======================================= Coverage 99.98% 99.98% ======================================= Files 193 193 Lines 17010 17010 ======================================= Hits 17007 17007 Misses 3 3 ```

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

facebook-github-bot commented 2 months ago

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

facebook-github-bot commented 2 months ago

@kit1980 merged this pull request in pytorch/botorch@200cb2a1d4cc593b2b9626f39e9983f3e28c19fa.