class_docstr: Keras Callback that will commit the `state` object every `batches_per_commit`
  batches at the end of each batch.
class_docstr_tok: ["Keras","Callback","that","will","commit","the","`","state","`","object","every","`","batches_per_commit","`","batches","at","the","end","of","each","batch","."]
docstr: Constructs a new CommitStateCallback.
  
  Args:
      state: `horovod.common.elastic.State` object to be committed.
      batches_per_commit: Number of batches to complete between each commit (default: 1).
docstr_tok: ["Constructs","a","new","CommitStateCallback",".","Args",":","state",":","`","horovod.common.elastic.State","`","object","to","be","committed",".","batches_per_commit",":","Number","of","batches","to","complete","between","each","commit","(","default",":","1",")","."]
code: def __init__(self, state, batches_per_commit=1):
      """
      Constructs a new CommitStateCallback.
  
      Args:
          state: `horovod.common.elastic.State` object to be committed.
          batches_per_commit: Number of batches to complete between each commit (default: 1).
      """
      super(CommitStateCallback, self).__init__(
          keras.backend, state, batches_per_commit
      )
  
file_path: horovod/horovod/keras/elastic.py
imports: import keras
  from horovod._keras import elastic
  from horovod.tensorflow.elastic import TensorFlowKerasState, run
label_desc: Use image node_id 1 to create a new CommitStateCallback object from inherited base classes: _impl, keras.callbacks with example: obj = CommitStateCallback(state, batches_per_commit)