class_docstr: A trial class which does nothing (except for maybe sleep) during training
  and validation.  For testing purposes.
code: def __init__(self, *args: Any, **kwargs: Any) -> None:
      super().__init__(*args, **kwargs)
      self.metric_writer = self.create_metric_writer()
  
      check_startup_hook_ran = self.env.hparams.get(
          "check_startup_hook_ran", False
      )
      if check_startup_hook_ran:
          check.true(
              os.path.isfile("startup-hook-ran"), "File should exists."
          )
  
      self.chaos = random.SystemRandom()
      self._batch_size = self.context.get_per_slot_batch_size()
      self.chaos_probability = self.env.hparams.get(
          "chaos_probability", 0
      )
      self.chaos_probability_train = self.env.hparams.get(
          "chaos_probability_train"
      )
      self.chaos_probability_validate = self.env.hparams.get(
          "chaos_probability_validate"
      )
      self.chaos_probability_checkpoint = self.env.hparams.get(
          "chaos_probability_checkpoint"
      )
      self.nan_probability_validate = self.env.hparams.get(
          "nan_probability_validate", 0
      )
      self.fail_on_first_validation = self.env.hparams.get(
          "fail_on_first_validation", ""
      )
      self.fail_on_chechpoint_save = self.env.hparams.get(
          "fail_on_chechpoint_save", ""
      )
      self.validation_set_size = self.env.hparams.get(
          "validation_set_size", 32 * 32
      )
      self.train_batch_secs = self.env.hparams.get(
          "training_batch_seconds", 0
      )
      self.validation_secs = self.env.hparams.get(
          "validation_seconds",
          self.validation_set_size
          * self.train_batch_secs
          / self._batch_size,
      )
      self.num_training_metrics = self.env.hparams.get(
          "num_training_metrics", 1
      )
      assert self.num_training_metrics > 0
      self.num_validation_metrics = self.env.hparams.get(
          "num_validation_metrics", 1
      )
      assert self.num_validation_metrics > 0
      self.save_secs = self.env.hparams.get(
          "save_checkpoint_seconds", 0
      )
      self.load_secs = self.env.hparams.get("load_checkpoint_secs", 0)
      self.metrics_progression = self.env.hparams.get(
          "metrics_progression", "decreasing"
      )
      assert self.metrics_progression in (
          "increasing",
          "decreasing",
          "constant",
      )
      self.metrics_base = self.env.hparams.get("metrics_base", 0.9)
      assert 0 < self.metrics_base < 1
      self.metrics_sigma = self.env.hparams.get("metrics_sigma", 0.0)
      assert 0 <= self.metrics_sigma
      self.write_null = self.env.hparams.get("write_null", False)
  
      self.request_stop = self.env.hparams.get("request_stop", False)
  
      self.non_chief_exit_immediately = self.env.hparams.get(
          "non_chief_exit_immediately", False
      )
  
      self.wlsq = None
      if self.workloads is None:
          (
              self.workloads,
              self.wlsq,
          ) = layers.make_compatibility_workloads(
              self.context._core,
              self.env,
              self.context.get_global_batch_size(),
          )
  
      self.steps_completed = self.env.steps_completed
  
      if self.env.latest_checkpoint is not None:
          with self.context._core.checkpoint.restore_path(
              self.env.latest_checkpoint
          ) as load_path:
              self.load(pathlib.Path(load_path))
      else:
          self.trained_steps = collections.Counter()
  
imports: import collections
  import json
  import logging
  import os
  import pathlib
  import pickle
  import random
  import sys
  import time
  from typing import Any, Dict, Optional
  import numpy
  import determined
  from determined import layers, tensorboard, util, workload
  from determined.common import check
label_desc: Use image node_id 1 to create a new NoOpTrialController object from inherited base classes: det with example: obj = NoOpTrialController()