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: Informs the searcher that the validation workload has completed after training for
  ``train_length`` units. It returns any new operations as a result of this workload
  completing
  
  Example:
  
  .. code:: python
  
      def on_validation_completed(
          self,
          searcher_state: SearcherState,
          request_id: uuid.UUID,
          metric: Any,
          train_length: int
      ) -> List[Operation]:
          if train_length < self.max_train_length:
              return [
                  searcher.ValidateAfter(
                      request_id=request_id,
                      length=train_length + 1,  # Run an additional unit of time
                  )
              ]
          return [searcher.Close(request_id=request_id)]
  
  Args:
      searcher_state (SearcherState): Read-only current searcher state
      request_id (uuid.UUID): Request UUID of the Trial that was trained
      metric (Any): Metric data returned by the trial
      train_length (int): The cumulative units of time that that trial has finished
          training for (epochs, etc.)
  
  Returns:
      List[Operation]: List of :class:`~Operation` to run upon completion of training for
      the given trial
docstr_tok: ["Informs","the","searcher","that","the","validation","workload","has","completed","after","training","for","``","train_length","``","units",".","It","returns","any","new","operations","as","a","result","of","this","workload","completing","Example",":","..","code",":",":","python","def","on_validation_completed","(","self",",","searcher_state",":","SearcherState",",","request_id",":","uuid.UUID",",","metric",":","Any",",","train_length",":","int",")","-",">","List","[","Operation","]",":","if","train_length","<","self.max_train_length",":","return","[","searcher.ValidateAfter","(","request_id=request_id",",","length=train_length","+","1",",","#","Run","an","additional","unit","of","time",")","]","return","[","searcher.Close","(","request_id=request_id",")","]","Args",":","searcher_state","(","SearcherState",")",":","Read-only","current","searcher","state","request_id","(","uuid.UUID",")",":","Request","UUID","of","the","Trial","that","was","trained","metric","(","Any",")",":","Metric","data","returned","by","the","trial","train_length","(","int",")",":","The","cumulative","units","of","time","that","that","trial","has","finished","training","for","(","epochs",",","etc",".",")","Returns",":","List","[","Operation","]",":","List","of",":","class",":","`","~Operation","`","to","run","upon","completion","of","training","for","the","given","trial"]
code: def on_validation_completed(
      self,
      searcher_state: SearcherState,
      request_id: uuid.UUID,
      metric: Any,
      train_length: int,
  ) -> List[Operation]:
      """
      Informs the searcher that the validation workload has completed after training for
      ``train_length`` units. It returns any new operations as a result of this workload
      completing
  
      Example:
  
      .. code:: python
  
          def on_validation_completed(
              self,
              searcher_state: SearcherState,
              request_id: uuid.UUID,
              metric: Any,
              train_length: int
          ) -> List[Operation]:
              if train_length < self.max_train_length:
                  return [
                      searcher.ValidateAfter(
                          request_id=request_id,
                          length=train_length + 1,  # Run an additional unit of time
                      )
                  ]
              return [searcher.Close(request_id=request_id)]
  
      Args:
          searcher_state (SearcherState): Read-only current searcher state
          request_id (uuid.UUID): Request UUID of the Trial that was trained
          metric (Any): Metric data returned by the trial
          train_length (int): The cumulative units of time that that trial has finished
              training for (epochs, etc.)
  
      Returns:
          List[Operation]: List of :class:`~Operation` to run upon completion of training for
          the given trial
      """
      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 3 for calling the SearchMethod obj's underlying member method code with example usage: obj.on_validation_completed(searcher_state, request_id, metric, train_length) without return types