class_docstr: Writes summary data for visualization in TensorBoard.
  
  This class is not thread-safe.
  
  TODO(#4581): This API should be considered EXPERIMENTAL and subject to
  backwards-incompatible changes without notice.
class_docstr_tok: ["Writes","summary","data","for","visualization","in","TensorBoard",".","This","class","is","not","thread-safe",".","TODO","(","#","4581",")",":","This","API","should","be","considered","EXPERIMENTAL","and","subject","to","backwards-incompatible","changes","without","notice","."]
docstr: Adds a scalar summary.
  
  Args:
    tag: string tag used to uniquely identify this time series.
    data: numeric scalar value for this data point. Accepts any value that
      can be converted to a `np.float32` scalar.
    step: integer step value for this data point. Accepts any value that
      can be converted to a `np.int64` scalar.
    wall_time: optional `float` seconds since the Unix epoch, representing
      the real-world timestamp for this data point. Defaults to None in
      which case the current time will be used.
    description: optional string description for this entire time series.
      This should be constant for a given tag; only the first value
      encountered will be used.
docstr_tok: ["Adds","a","scalar","summary",".","Args",":","tag",":","string","tag","used","to","uniquely","identify","this","time","series",".","data",":","numeric","scalar","value","for","this","data","point",".","Accepts","any","value","that","can","be","converted","to","a","`","np.float32","`","scalar",".","step",":","integer","step","value","for","this","data","point",".","Accepts","any","value","that","can","be","converted","to","a","`","np.int64","`","scalar",".","wall_time",":","optional","`","float","`","seconds","since","the","Unix","epoch",",","representing","the","real-world","timestamp","for","this","data","point",".","Defaults","to","None","in","which","case","the","current","time","will","be","used",".","description",":","optional","string","description","for","this","entire","time","series",".","This","should","be","constant","for","a","given","tag",";","only","the","first","value","encountered","will","be","used","."]
code: def add_scalar(
      self, tag, data, step, *, wall_time=None, description=None
  ):
      """Adds a scalar summary.
  
      Args:
        tag: string tag used to uniquely identify this time series.
        data: numeric scalar value for this data point. Accepts any value that
          can be converted to a `np.float32` scalar.
        step: integer step value for this data point. Accepts any value that
          can be converted to a `np.int64` scalar.
        wall_time: optional `float` seconds since the Unix epoch, representing
          the real-world timestamp for this data point. Defaults to None in
          which case the current time will be used.
        description: optional string description for this entire time series.
          This should be constant for a given tag; only the first value
          encountered will be used.
      """
      self._check_not_closed()
      validated_data = _validate_scalar_shape(np.float32(data), "data")
      validated_step = _validate_scalar_shape(np.int64(step), "step")
      wall_time = wall_time if wall_time is not None else time.time()
      self._output.emit_scalar(
          plugin_name=scalars_metadata.PLUGIN_NAME,
          tag=tag,
          data=validated_data,
          step=validated_step,
          wall_time=wall_time,
          description=description,
      )
  
file_path: tensorboard/tensorboard/summary/_writer.py
imports: import time
  import numpy
  from tensorboard.plugins.scalar import metadata
  from tensorboard.summary import _output
label_desc: Use image node_id 5 for calling the Writer obj's underlying member method code with example usage: obj.add_scalar(tag, data, step) without return types