class_docstr: TrialContext is the system-provided API to a Trial class.
class_docstr_tok: ["TrialContext","is","the","system-provided","API","to","a","Trial","class","."]
docstr: Return the current value of the hyperparameter with the given name.
docstr_tok: ["Return","the","current","value","of","the","hyperparameter","with","the","given","name","."]
code: def get_hparam(self, name: str) -> Any:
      """
      Return the current value of the hyperparameter with the given name.
      """
      if name not in self.env.hparams:
          raise ValueError(
              "Could not find name '{}' in experiment "
              "hyperparameters. Please check your experiment "
              "configuration 'hyperparameters' section.".format(name)
          )
      if name == "global_batch_size":
          logger.warning(
              "Please use `context.get_per_slot_batch_size()` and "
              "`context.get_global_batch_size()` instead of accessing "
              "`global_batch_size` directly."
          )
      return self.env.hparams[name]
  
file_path: determined/harness/determined/_trial_context.py
imports: import logging
  import pathlib
  from typing import Any, Dict
  import determined
  from determined import core
label_desc: Use image node_id 9 for calling the TrialContext obj's underlying member method code with example usage: obj.get_hparam(name) and returns: self