class_docstr: Models a simple one variable(y = wx) neural network, and a MSE loss function.
class_docstr_tok: ["Models","a","simple","one","variable","(","y","=","wx",")","neural","network",",","and","a","MSE","loss","function","."]
code: def keras_callbacks(self):
      epochs = self.context.get_hparams().get("epochs")
      validations = self.context.get_hparams().get("validations")
      # Include a bunch of callbacks just to make sure they work.
      # EarlyStopping changed in TF 2.5 to stop unconditionally
      # if patience=0
      return [
          keras_cb_checker.CBChecker(
              epochs=epochs, validations=validations
          ),
          keras.callbacks.TensorBoard(),
          keras.callbacks.ReduceLROnPlateau(monitor="val_loss"),
          keras.callbacks.EarlyStopping(
              restore_best_weights=True, patience=1
          ),
      ]
      return
  
file_path: determined/harness/tests/experiment/fixtures/tf_keras_one_var_model.py
imports: from typing import Any, Dict, List, cast
  import numpy
  import tensorflow
  from tensorflow.keras.layers import Dense
  from tensorflow.keras.losses import mean_squared_error
  from tensorflow.keras.models import Sequential
  from tensorflow.keras.optimizers.legacy import SGD
  from determined import keras
  from tests.experiment.fixtures import keras_cb_checker
label_desc: Use image node_id 7 for calling the OneVarTrial obj's underlying member method code with example usage: obj.keras_callbacks() and returns: list