class_docstr: The implementation of a custom hyperparameter tuning algorithm.
  
  To implement your specific hyperparameter tuning approach, subclass ``SearchMethod``
  overriding the event handler methods.
  
  Each event handler, except :meth:`progress() <determined.searcher.SearchMethod.progress>`
  returns a list of operations (``List[Operation]``) that will be submitted to master for
  processing.
  
  Currently, we support the following :class:`~Operation`:
  
  - :class:`~Create` - starts a new trial with a unique trial id and a set of hyperparameter
    values.
  - :class:`~ValidateAfter` - sets number of steps (i.e., batches or epochs) after which a
    validation is run for a trial with a given id.
  - :class:`~Progress` - updates the progress of the multi-trial experiment to the master.
  - :class:`~Close` - closes a trial with a given id.
  - :class:`~Shutdown` - closes the experiment.
  
  .. note::
  
      Do not modify ``searcher_state`` passed into event handlers.
class_docstr_tok: ["The","implementation","of","a","custom","hyperparameter","tuning","algorithm",".","To","implement","your","specific","hyperparameter","tuning","approach",",","subclass","``","SearchMethod","``","overriding","the","event","handler","methods",".","Each","event","handler",",","except",":","meth",":","`","progress","(",")","<","determined.searcher.SearchMethod.progress",">","`","returns","a","list","of","operations","(","``","List","[","Operation","]","``",")","that","will","be","submitted","to","master","for","processing",".","Currently",",","we","support","the","following",":","class",":","`","~Operation","`",":","-",":","class",":","`","~Create","`","-","starts","a","new","trial","with","a","unique","trial","id","and","a","set","of","hyperparameter","values",".","-",":","class",":","`","~ValidateAfter","`","-","sets","number","of","steps","(","i.e.",",","batches","or","epochs",")","after","which","a","validation","is","run","for","a","trial","with","a","given","id",".","-",":","class",":","`","~Progress","`","-","updates","the","progress","of","the","multi-trial","experiment","to","the","master",".","-",":","class",":","`","~Close","`","-","closes","a","trial","with","a","given","id",".","-",":","class",":","`","~Shutdown","`","-","closes","the","experiment",".","..","note",":",":","Do","not","modify","``","searcher_state","``","passed","into","event","handlers","."]
docstr: Returns a list of initial operations that the custom hyperparameter search should
  perform. This is called by the Custom Searcher :class:`~SearchRunner`
  to initialize the trials
  
  Example:
  
  .. code:: python
  
      def initial_operations(self, _: searcher.SearcherState) -> List[searcher.Operation]:
          ops: List[searcher.Operation] = []
          N = 100
          hparams = {
              # ...
          }
          for _ in range(0, N):
              create = searcher.Create(
                  request_id=uuid.uuid4(),
                  hparams=hparams,
                  checkpoint=None,
              )
              ops.append(create)
          return ops
  
  Args:
      searcher_state(:class:`~SearcherState`): Read-only current searcher state
  
  Returns:
      List[Operation]: Initial list of :class:`~Operation` to start the Hyperparameter
      search
docstr_tok: ["Returns","a","list","of","initial","operations","that","the","custom","hyperparameter","search","should","perform",".","This","is","called","by","the","Custom","Searcher",":","class",":","`","~SearchRunner","`","to","initialize","the","trials","Example",":","..","code",":",":","python","def","initial_operations","(","self",",","_",":","searcher.SearcherState",")","-",">","List","[","searcher.Operation","]",":","ops",":","List","[","searcher.Operation","]","=","[","]","N","=","100","hparams","=","{","#","...","}","for","_","in","range","(","0",",","N",")",":","create","=","searcher.Create","(","request_id=uuid.uuid4","(",")",",","hparams=hparams",",","checkpoint=None",",",")","ops.append","(","create",")","return","ops","Args",":","searcher_state","(",":","class",":","`","~SearcherState","`",")",":","Read-only","current","searcher","state","Returns",":","List","[","Operation","]",":","Initial","list","of",":","class",":","`","~Operation","`","to","start","the","Hyperparameter","search"]
code: def initial_operations(
      self, searcher_state: SearcherState
  ) -> List[Operation]:
      """
      Returns a list of initial operations that the custom hyperparameter search should
      perform. This is called by the Custom Searcher :class:`~SearchRunner`
      to initialize the trials
  
      Example:
  
      .. code:: python
  
          def initial_operations(self, _: searcher.SearcherState) -> List[searcher.Operation]:
              ops: List[searcher.Operation] = []
              N = 100
              hparams = {
                  # ...
              }
              for _ in range(0, N):
                  create = searcher.Create(
                      request_id=uuid.uuid4(),
                      hparams=hparams,
                      checkpoint=None,
                  )
                  ops.append(create)
              return ops
  
      Args:
          searcher_state(:class:`~SearcherState`): Read-only current searcher state
  
      Returns:
          List[Operation]: Initial list of :class:`~Operation` to start the Hyperparameter
          search
      """
      pass
  
imports: import abc
  import dataclasses
  import json
  import pathlib
  import uuid
  from abc import abstractmethod
  from enum import Enum
  from typing import Any, Dict, List, Optional, Set, Tuple
  from determined import experimental
  from determined.common.api import bindings
label_desc: Use image node_id 1 for calling the SearchMethod obj's underlying member method code with example usage: obj.initial_operations(searcher_state) without return types