class_docstr: Interface for strategies used to stop the optimization.
  
  Note that this is different from the `BaseEarlyStoppingStrategy`,
  the functionality of which is to decide whether a trial with partial
  results available during evaluation should be stopped before
  fully completing. In global early stopping, the decision is about
  whether or not to stop the overall optimzation altogether (e.g. b/c
  the expected marginal gains of running additional evaluations do not
  justify the cost of running these trials).
class_docstr_tok: ["Interface","for","strategies","used","to","stop","the","optimization",".","Note","that","this","is","different","from","the","`","BaseEarlyStoppingStrategy","`",",","the","functionality","of","which","is","to","decide","whether","a","trial","with","partial","results","available","during","evaluation","should","be","stopped","before","fully","completing",".","In","global","early","stopping",",","the","decision","is","about","whether","or","not","to","stop","the","overall","optimzation","altogether","(","e.g",".","b\/c","the","expected","marginal","gains","of","running","additional","evaluations","do","not","justify","the","cost","of","running","these","trials",")","."]
docstr: Decide whether to stop optimization.
  
  Must be implemented by the subclass. Typical examples include stopping
  the optimization loop when the objective appears to not improve anymore.
  
  Args:
      experiment: Experiment that contains the trials and other contextual data.
  
  Returns:
      A Tuple with a boolean determining whether the optimization should stop,
      and a str declaring the reason for stopping.
docstr_tok: ["Decide","whether","to","stop","optimization",".","Must","be","implemented","by","the","subclass",".","Typical","examples","include","stopping","the","optimization","loop","when","the","objective","appears","to","not","improve","anymore",".","Args",":","experiment",":","Experiment","that","contains","the","trials","and","other","contextual","data",".","Returns",":","A","Tuple","with","a","boolean","determining","whether","the","optimization","should","stop",",","and","a","str","declaring","the","reason","for","stopping","."]
code: def _should_stop_optimization(
      self, experiment: Experiment, **kwargs: Any
  ) -> Tuple[bool, str]:
      """
      Decide whether to stop optimization.
  
      Must be implemented by the subclass. Typical examples include stopping
      the optimization loop when the objective appears to not improve anymore.
  
      Args:
          experiment: Experiment that contains the trials and other contextual data.
  
      Returns:
          A Tuple with a boolean determining whether the optimization should stop,
          and a str declaring the reason for stopping.
      """
  
file_path: Ax/ax/global_stopping/strategies/base.py
imports: from abc import ABC, abstractmethod
  from typing import Any, Tuple
  from ax.core.base_trial import TrialStatus
  from ax.core.experiment import Experiment
  from ax.utils.common.base import Base
label_desc: Use image node_id 2 for calling the BaseGlobalStoppingStrategy obj's underlying member method code with example usage: obj._should_stop_optimization(experiment) without return types