Repository navigation
Refactor qConstrainedLogEI - #6779
Conversation
|
I’ll mark this PR as ready for review once #6744 has been merged. |
|
@kAIto47802 Could you review this PR? |
|
@kAIto47802 Thank you for pointing it out. I’ve applied the change! |
| # NOTE(nabe): Do NOT use 1 << 31 to avoid overflow. Multi-objective and constrained optimizations | ||
| # use qmc_seed + buffer. Since buffer is sufficiently small (like ~30), using `1 << 30` guarantees | ||
| # no overflow. |
There was a problem hiding this comment.
This comment seems inaccurate. SobolEngine internally uses torch.Generator.manual_seed, whose officially documented valid seed range is [-2^63, 2^64 - 1]. Therefore, 1 << 31 is within the supported range:
https://docs.pytorch.org/docs/2.13/generated/torch.Generator.html#torch.Generator.manual_seed
Also, the scalar result of RandomState.randint(...) and the subsequent i + 1 addition are handled as Python integers, so they do not overflow at the 32-bit boundary.
| # NOTE(nabe): Do NOT use 1 << 31 to avoid overflow. Multi-objective and constrained optimizations | |
| # use qmc_seed + buffer. Since buffer is sufficiently small (like ~30), using `1 << 30` guarantees | |
| # no overflow. | |
| # NOTE(nabe): Multi-objective and constrained optimization may derive QMC seeds by adding small | |
| # (e.g., around 30) offsets to a base seed. Use `1 << 30` as a conservative upper bound. |
|
Thank you for the update! It almost looks good to me, with some comments. |
|
Thank you! I had missed that point. I’ve updated the comment accordingly. PTAL! |
Co-authored-by: Kaito Baba <[email protected]>
kAIto47802
left a comment
There was a problem hiding this comment.
Thank you for the update! LGTM
Motivation
qConstrainedLogEI#6744 (review).qConstrainedLogEI#6744 (comment).Description of the changes
qConstrainedLogEI.