class_docstr: Saves data in event and summary protos for tensorboard.
class_docstr_tok: ["Saves","data","in","event","and","summary","protos","for","tensorboard","."]
docstr: Saves scalar value.
  
  Args:
    tag: str: label for this data
    value: int/float: number to log
    step: int: training step
docstr_tok: ["Saves","scalar","value",".","Args",":","tag",":","str",":","label","for","this","data","value",":","int\/float",":","number","to","log","step",":","int",":","training","step"]
code: def scalar(self, tag, value, step):
      """Saves scalar value.
  
      Args:
        tag: str: label for this data
        value: int/float: number to log
        step: int: training step
      """
      value = float(np.array(value))
      with self._as_default(self._event_writer):
          tf.summary.scalar(name=tag, data=value, step=step)
  
file_path: flax/flax/metrics/tensorboard.py
imports: import contextlib
  import functools
  import os
  import numpy
  import tensorflow
  from tensorboard.plugins.hparams import api
  from flax import io
label_desc: Use image node_id 4 for calling the SummaryWriter obj's underlying member method code with example usage: obj.scalar(tag, value, step) without return types