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

Deprecate no_bayesian_optimization argument in favor of force_random_search #2693

Closed
wants to merge 1 commit into from

Commits on Aug 23, 2024

  1. Deprecate no_bayesian_optimization argument in favor of `force_rand…

    …om_search` (facebook#2693)
    
    Summary:
    Pull Request resolved: facebook#2693
    
    This deprecates the `no_bayesian_optimization` argument in favor of `force_random_search`. It is a "soft" deprecation in which we continue to provide support for the `no_bayesian_optimization` argument, but we turn it into an *optional* one and raise a deprecation warning when it is specified explicitly by the user.
    
    If this soft deprecation does not start any fires in the coming few weeks, we will move forward with a "hard" deprecation in follow-up task T199632397.
    
    - In the `GenerationStrategyConfig` dataclass we turned `no_bayesian_optimization` into an [init-only variable](https://docs.python.org/3/library/dataclasses.html#init-only-variables) (so it no longer become a "field").
    - Everywhere that it appears as an argument, `no_bayesian_optimization` is now an *optional* argument with a default value of `None`. Whenever it is not `None`, we raise a deprecation warning and, whenever its value conflicts with `force_random_search` (non-optional, default `False`), we raise a `ValueError`.
    
    Differential Revision: D61601511
    ltiao authored and facebook-github-bot committed Aug 23, 2024
    Configuration menu
    Copy the full SHA
    6c9f7d7 View commit details
    Browse the repository at this point in the history