diff --git a/python/ray/tune/suggest/ax.py b/python/ray/tune/suggest/ax.py index 6e5cd3cdd..8cc6949ff 100644 --- a/python/ray/tune/suggest/ax.py +++ b/python/ray/tune/suggest/ax.py @@ -42,7 +42,7 @@ class AxSearch(Searcher): (list of two values, lower bound first), "values" for choice parameters (list of values), and "value" for fixed parameters (single value). - objective_name (str): Name of the metric used as objective in this + metric (str): Name of the metric used as objective in this experiment. This metric must be present in `raw_data` argument to `log_data`. This metric must also be present in the dict reported/returned by the Trainable. @@ -53,7 +53,7 @@ class AxSearch(Searcher): outcome_constraints (list[str]): Outcome constraints of form "metric_name >= bound", like "m1 <= 3." ax_client (AxClient): Optional AxClient instance. If this is set, do - not pass any values to these parameters: `space`, `objective_name`, + not pass any values to these parameters: `space`, `metric`, `parameter_constraints`, `outcome_constraints`. use_early_stopped_trials: Deprecated. max_concurrent (int): Deprecated. @@ -75,7 +75,7 @@ class AxSearch(Searcher): intermediate_result = config["x1"] + config["x2"] * i tune.report(score=intermediate_result) - ax_search = AxSearch(objective_name="score") + ax_search = AxSearch(metric="score") tune.run( config=config, easy_objective, @@ -99,7 +99,7 @@ class AxSearch(Searcher): intermediate_result = config["x1"] + config["x2"] * i tune.report(score=intermediate_result) - ax_search = AxSearch(space=parameters, objective_name="score") + ax_search = AxSearch(space=parameters, metric="score") tune.run(easy_objective, search_alg=ax_search) """ @@ -113,7 +113,9 @@ class AxSearch(Searcher): ax_client: Optional[AxClient] = None, use_early_stopped_trials: Optional[bool] = None, max_concurrent: Optional[int] = None): - assert ax is not None, "Ax must be installed!" + assert ax is not None, """Ax must be installed! + You can install AxSearch with the command: + `pip install ax-platform sqlalchemy`.""" if mode: assert mode in ["min", "max"], "`mode` must be 'min' or 'max'." diff --git a/python/ray/tune/suggest/bohb.py b/python/ray/tune/suggest/bohb.py index 33f22640f..e5f371674 100644 --- a/python/ray/tune/suggest/bohb.py +++ b/python/ray/tune/suggest/bohb.py @@ -106,7 +106,9 @@ class TuneBOHB(Searcher): mode: Optional[str] = None, seed: Optional[int] = None): from hpbandster.optimizers.config_generators.bohb import BOHB - assert BOHB is not None, "HpBandSter must be installed!" + assert BOHB is not None, """HpBandSter must be installed! + You can install HpBandSter with the command: + `pip install hpbandster ConfigSpace`.""" if mode: assert mode in ["min", "max"], "`mode` must be 'min' or 'max'." self._max_concurrent = max_concurrent diff --git a/python/ray/tune/suggest/nevergrad.py b/python/ray/tune/suggest/nevergrad.py index 75a399a6c..901ba4978 100644 --- a/python/ray/tune/suggest/nevergrad.py +++ b/python/ray/tune/suggest/nevergrad.py @@ -100,7 +100,9 @@ class NevergradSearch(Searcher): mode: Optional[str] = None, max_concurrent: Optional[int] = None, **kwargs): - assert ng is not None, "Nevergrad must be installed!" + assert ng is not None, """Nevergrad must be installed! + You can install Nevergrad with the command: + `pip install nevergrad`.""" if mode: assert mode in ["min", "max"], "`mode` must be 'min' or 'max'." diff --git a/python/ray/tune/suggest/sigopt.py b/python/ray/tune/suggest/sigopt.py index b3d0d2122..415e8aa3a 100644 --- a/python/ray/tune/suggest/sigopt.py +++ b/python/ray/tune/suggest/sigopt.py @@ -144,7 +144,9 @@ class SigOptSearch(Searcher): if connection is not None: self.conn = connection else: - assert sgo is not None, "SigOpt must be installed!" + assert sgo is not None, """SigOpt must be installed! + You can install SigOpt with the command: + `pip install -U sigopt`.""" assert "SIGOPT_KEY" in os.environ, \ "SigOpt API key must be stored as " \ "environ variable at SIGOPT_KEY"