Skip to content

Conversation

@sunnyshen321
Copy link

Summary:
Previously, we had dedup settings on both Generator and GenerationNode level, which is unnecessary and error-prone for accidentally using 2 different dedup settings at the 2 levels (see D92094386)

Given that only SobolGenerator has special dedup logic, we've decided to deprecate deduplicate setting in Generator and only rely on GenerationNode level deduplication.

Furthermore, since we generally expect dedup to be True for OSS use cases and AutoML use cases, we set GenerationNode.should_deduplicate=True by default while explicitly overwriting GNode dedup to False for online use cases.

One Potential Issue
Currently RandomAdapter._gen solely relies on SOBOL generator to dedup (by passing in generated_points to sobol generator and then rejection_sample- https://fburl.com/code/zmqfhn8g) and if we remove that, anyone that's using standalone RandomAdapter (without a GNode) may get duplicated trials if they call RandomAdapter.gen multiple times. This is partially mitigated by advancing init_position on sobol generator -- there shouldn't be duplicated points for continuous parameters, but if there are discrete parameters we can be producing duplicated points after rounding. The recommended path is through GenerationStrategy/GenerationNode, where dedup is properly handled. But there's no enforcement on never using standalone RandomAdapter. (ps. TorchAdapter passes pending_observations through to the BoTorch acquisition function as X_pending so it doesn't have the same problem)

Differential Revision: D92884352

…nNode.should_deduplicate=True` by default

Summary:
Previously, we had dedup settings on both `Generator` and `GenerationNode` level, which is unnecessary and error-prone for accidentally using 2 different dedup settings at the 2 levels (see D92094386)

Given that only `SobolGenerator` has special dedup logic, we've decided to deprecate `deduplicate` setting in `Generator` and only rely on `GenerationNode` level deduplication.

Furthermore, since we generally expect dedup to be True for OSS use cases and AutoML use cases, we set `GenerationNode.should_deduplicate=True` by default while explicitly overwriting GNode dedup to False for online use cases.


**One Potential Issue**
Currently `RandomAdapter._gen` solely relies on SOBOL generator to dedup (by passing in `generated_points` to sobol generator and then `rejection_sample`- https://fburl.com/code/zmqfhn8g) and if we remove that, anyone that's using standalone `RandomAdapter` (without a GNode) may get duplicated trials if they call `RandomAdapter.gen` multiple times. This is partially mitigated by advancing `init_position` on sobol generator -- there shouldn't be duplicated points for continuous parameters, but if there are discrete parameters we can be producing duplicated points after rounding. The recommended path is through GenerationStrategy/GenerationNode, where dedup is properly handled. But there's no enforcement on never using standalone RandomAdapter. (ps. `TorchAdapter` passes pending_observations through to the BoTorch acquisition function as X_pending so it doesn't have the same problem)

Differential Revision: D92884352
@meta-cla meta-cla bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Feb 10, 2026
@meta-codesync
Copy link

meta-codesync bot commented Feb 10, 2026

@sunnyshen321 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D92884352.

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. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant