code: def log_scalar(self, metric_name, value, step=None):
          
          # Method added in change https://github.com/chovanecm/sacred/issues/4
          # The same as Experiment.log_scalar (if something changes,
          # update the docstring too!)
  
          return self._metrics.log_scalar_metric(metric_name, value, step)
docs: Add a new measurement.
  
          The measurement will be processed by the MongoDB observer
          during a heartbeat event.
          Other observers are not yet supported.
  
          :param metric_name: The name of the metric, e.g. training.loss
          :param value: The measured value
          :param step: The step number (integer), e.g. the iteration number
                      If not specified, an internal counter for each metric
                      is used, incremented by one.