class_docstr: A ``SearcherOperation`` is a request from the hyperparameter-search logic for the training
  script to execute one train-validate-report cycle.
  
  Some searchers, such as single, random, or grid, pass only a single ``SearcherOperation`` to
  each trial, while others may pass many ``SearcherOperations``.
  
  Each ``SearcherOperation`` has a length attribute representing the cumulative training that
  should be completed before the validate-report steps of the cycle.  The length attribute is
  absolute, not incremental, meaning that if the searcher wants you to train for 10 units and
  validate, then train for 10 more units and validate, it emits one ``SearcherOperation`` with
  ``.length=10`` followed by a second ``SearcherOperation`` with ``.length=20``.  Using absolute
  lengths instead of incremental lengths makes restarting after crashes simple and robust.
class_docstr_tok: ["A","``","SearcherOperation","``","is","a","request","from","the","hyperparameter-search","logic","for","the","training","script","to","execute","one","train-validate-report","cycle",".","Some","searchers",",","such","as","single",",","random",",","or","grid",",","pass","only","a","single","``","SearcherOperation","``","to","each","trial",",","while","others","may","pass","many","``","SearcherOperations","``",".","Each","``","SearcherOperation","``","has","a","length","attribute","representing","the","cumulative","training","that","should","be","completed","before","the","validate-report","steps","of","the","cycle",".","The","length","attribute","is","absolute",",","not","incremental",",","meaning","that","if","the","searcher","wants","you","to","train","for","10","units","and","validate",",","then","train","for","10","more","units","and","validate",",","it","emits","one","``","SearcherOperation","``","with","``",".length=10","``","followed","by","a","second","``","SearcherOperation","``","with","``",".length=20","``",".","Using","absolute","lengths","instead","of","incremental","lengths","makes","restarting","after","crashes","simple","and","robust","."]
code: def __init__(
      self,
      session: api.Session,
      trial_id: int,
      length: int,
      is_chief: bool,
  ) -> None:
      self._session = session
      self._trial_id = trial_id
      self._length = length
      self._is_chief = is_chief
      self._completed = False
  
imports: import enum
  import logging
  from typing import Any, Iterator, Optional
  import determined
  from determined import core
  from determined.common import api
label_desc: Use image node_id 1 to create a new SearcherOperation object  with example: obj = SearcherOperation(session, trial_id, length, is_chief)