class_docstr: Implements the Async Successive Halving.
  
  This should provide similar theoretical performance as HyperBand but
  avoid straggler issues that HyperBand faces. One implementation detail
  is when using multiple brackets, trial allocation to bracket is done
  randomly with over a softmax probability.
  
  See https://arxiv.org/abs/1810.05934
  
  Args:
      time_attr: A training result attr to use for comparing time.
          Note that you can pass in something non-temporal such as
          `training_iteration` as a measure of progress, the only requirement
          is that the attribute should increase monotonically.
      metric: The training result objective value attribute. Stopping
          procedures will use this attribute. If None but a mode was passed,
          the `ray.tune.result.DEFAULT_METRIC` will be used per default.
      mode: One of {min, max}. Determines whether objective is
          minimizing or maximizing the metric attribute.
      max_t: max time units per trial. Trials will be stopped after
          max_t time units (determined by time_attr) have passed.
      grace_period: Only stop trials at least this old in time.
          The units are the same as the attribute named by `time_attr`.
      reduction_factor: Used to set halving rate and amount. This
          is simply a unit-less scalar.
      brackets: Number of brackets. Each bracket has a different
          halving rate, specified by the reduction factor.
      stop_last_trials: Whether to terminate the trials after
          reaching max_t. Defaults to True.
class_docstr_tok: ["Implements","the","Async","Successive","Halving",".","This","should","provide","similar","theoretical","performance","as","HyperBand","but","avoid","straggler","issues","that","HyperBand","faces",".","One","implementation","detail","is","when","using","multiple","brackets",",","trial","allocation","to","bracket","is","done","randomly","with","over","a","softmax","probability",".","See","https",":","\/\/arxiv.org\/abs\/1810.05934","Args",":","time_attr",":","A","training","result","attr","to","use","for","comparing","time",".","Note","that","you","can","pass","in","something","non-temporal","such","as","`","training_iteration","`","as","a","measure","of","progress",",","the","only","requirement","is","that","the","attribute","should","increase","monotonically",".","metric",":","The","training","result","objective","value","attribute",".","Stopping","procedures","will","use","this","attribute",".","If","None","but","a","mode","was","passed",",","the","`","ray.tune.result.DEFAULT_METRIC","`","will","be","used","per","default",".","mode",":","One","of","{","min",",","max","}",".","Determines","whether","objective","is","minimizing","or","maximizing","the","metric","attribute",".","max_t",":","max","time","units","per","trial",".","Trials","will","be","stopped","after","max_t","time","units","(","determined","by","time_attr",")","have","passed",".","grace_period",":","Only","stop","trials","at","least","this","old","in","time",".","The","units","are","the","same","as","the","attribute","named","by","`","time_attr","`",".","reduction_factor",":","Used","to","set","halving","rate","and","amount",".","This","is","simply","a","unit-less","scalar",".","brackets",":","Number","of","brackets",".","Each","bracket","has","a","different","halving","rate",",","specified","by","the","reduction","factor",".","stop_last_trials",":","Whether","to","terminate","the","trials","after","reaching","max_t",".","Defaults","to","True","."]
code: def set_search_properties(
      self, metric: Optional[str], mode: Optional[str], **spec
  ) -> bool:
      if self._metric and metric:
          return False
      if self._mode and mode:
          return False
  
      if metric:
          self._metric = metric
      if mode:
          self._mode = mode
  
      if self._mode == "max":
          self._metric_op = 1.0
      elif self._mode == "min":
          self._metric_op = -1.0
  
      if self._metric is None and self._mode:
          # If only a mode was passed, use anonymous metric
          self._metric = DEFAULT_METRIC
  
      return True
  
imports: import logging
  from typing import Dict, Optional, Union, TYPE_CHECKING
  import numpy
  import pickle
  from ray.tune.result import DEFAULT_METRIC
  from ray.tune.schedulers.trial_scheduler import FIFOScheduler, TrialScheduler
  from ray.tune.experiment import Trial
  from ray.util import PublicAPI
label_desc: Use image node_id 2 for calling the AsyncHyperBandScheduler obj's underlying member method code with example usage: obj.set_search_properties(metric, mode) and returns: True, False, False