class_docstr: A generic hyperparameter fit reporter that outputs the result as
  JSON to an arbitrary data stream, which may be read as a third-party
  tool
  
  Arguments
  ---------
  objective_key: str
      the key from the result dictionary to be used as the objective
docstr: Reports the objective for hyperparameter optimization.
  
  Arguments
  ---------
  result: dict
      a dictionary with the run result.
  
  Example
  -------
  >>> reporter = GenericHyperparameterOptimizationReporter(
  ...     objective_key="error"
  ... )
  >>> result = {"error": 1.2, "train_loss": 7.2}
  >>> reporter.report_objective(result)
  {"error": 1.2, "train_loss": 7.2, "objective": 1.2}
docstr_tok: ["Reports","the","objective","for","hyperparameter","optimization",".","Arguments","--","--","--","--","-","result",":","dict","a","dictionary","with","the","run","result",".","Example","--","--","--","-",">",">",">","reporter","=","GenericHyperparameterOptimizationReporter","(","...","objective_key=","''","error","''","...",")",">",">",">","result","=","{","``","error","''",":","1.2",",","``","train_loss","''",":","7.2","}",">",">",">","reporter.report_objective","(","result",")","{","``","error","''",":","1.2",",","``","train_loss","''",":","7.2",",","``","objective","''",":","1.2","}"]
code: def report_objective(self, result):
      """Reports the objective for hyperparameter optimization.
  
      Arguments
      ---------
      result: dict
          a dictionary with the run result.
  
      Example
      -------
      >>> reporter = GenericHyperparameterOptimizationReporter(
      ...     objective_key="error"
      ... )
      >>> result = {"error": 1.2, "train_loss": 7.2}
      >>> reporter.report_objective(result)
      {"error": 1.2, "train_loss": 7.2, "objective": 1.2}
      """
      json.dump(
          dict(result, objective=result[self.objective_key]),
          self.output,
      )
  
imports: import importlib
  import logging
  import json
  import os
  import speechbrain
  import sys
  from datetime import datetime
  from hyperpyyaml import load_hyperpyyaml
label_desc: Use image node_id 2 for calling the GenericHyperparameterOptimizationReporter obj's underlying member method code with example usage: obj.report_objective(result) without return types