class_docstr: The ``Logger`` class is the ClearML console log and metric statistics interface, and contains methods for explicit
  reporting.
  
  Explicit reporting extends ClearML automagical capturing of inputs and output. Explicit reporting
  methods include scalar plots, line plots, histograms, confusion matrices, 2D and 3D scatter
  diagrams, text logging, tables, and image uploading and reporting.
  
  In the **ClearML Web-App (UI)**, ``Logger`` output appears in the **RESULTS** tab, **CONSOLE**, **SCALARS**,
  **PLOTS**, and **DEBUG SAMPLES** sub-tabs. When you compare experiments, ``Logger`` output appears in the
  comparisons.
  
  .. warning::
  
     Do not construct Logger objects directly.
  
  You must get a Logger object before calling any of the other ``Logger`` class methods by calling
  :meth:`.Task.get_logger` or :meth:`Logger.current_logger`.
class_docstr_tok: ["The","``","Logger","``","class","is","the","ClearML","console","log","and","metric","statistics","interface",",","and","contains","methods","for","explicit","reporting",".","Explicit","reporting","extends","ClearML","automagical","capturing","of","inputs","and","output",".","Explicit","reporting","methods","include","scalar","plots",",","line","plots",",","histograms",",","confusion","matrices",",","2D","and","3D","scatter","diagrams",",","text","logging",",","tables",",","and","image","uploading","and","reporting",".","In","the","*","*","ClearML","Web-App","(","UI",")","*","*",",","``","Logger","``","output","appears","in","the","*","*","RESULTS","*","*","tab",",","*","*","CONSOLE","*","*",",","*","*","SCALARS","*","*",",","*","*","PLOTS","*","*",",","and","*","*","DEBUG","SAMPLES","*","*","sub-tabs",".","When","you","compare","experiments",",","``","Logger","``","output","appears","in","the","comparisons",".","..","warning",":",":","Do","not","construct","Logger","objects","directly",".","You","must","get","a","Logger","object","before","calling","any","of","the","other","``","Logger","``","class","methods","by","calling",":","meth",":","`",".Task.get_logger","`","or",":","meth",":","`","Logger.current_logger","`","."]
docstr: For explicit reporting, plot a (default grouped) histogram.
  Notice this function will not calculate the histogram,
  it assumes the histogram was already calculated in `values`
  
  For example:
  
  .. code-block:: py
  
     vector_series = np.random.randint(10, size=10).reshape(2,5)
     logger.report_histogram(title='histogram example', series='histogram series',
          values=vector_series, iteration=0, labels=['A','B'], xaxis='X axis label', yaxis='Y axis label')
  
  You can view the reported histograms in the **ClearML Web-App (UI)**, **RESULTS** tab, **PLOTS** sub-tab.
  
  :param title: The title (metric) of the plot.
  :param series: The series name (variant) of the reported histogram.
  :param values: The series values. A list of floats, or an N-dimensional Numpy array containing
      data for each histogram bar.
  :param iteration: The reported iteration / step. Each ``iteration`` creates another plot.
  :param labels: Labels for each bar group, creating a plot legend labeling each series. (Optional)
  :param xlabels: Labels per entry in each bucket in the histogram (vector), creating a set of labels
      for each histogram bar on the x-axis. (Optional)
  :param xaxis: The x-axis title. (Optional)
  :param yaxis: The y-axis title. (Optional)
  :param mode: Multiple histograms mode, stack / group / relative. Default is 'group'.
  :param data_args: optional dictionary for data configuration, passed directly to plotly
      See full details on the supported configuration: https://plotly.com/javascript/reference/bar/
      example: data_args={'orientation': 'h', 'marker': {'color': 'blue'}}
  :param extra_layout: optional dictionary for layout configuration, passed directly to plotly
      See full details on the supported configuration: https://plotly.com/javascript/reference/bar/
      example: extra_layout={'xaxis': {'type': 'date', 'range': ['2020-01-01', '2020-01-31']}}
docstr_tok: ["For","explicit","reporting",",","plot","a","(","default","grouped",")","histogram",".","Notice","this","function","will","not","calculate","the","histogram",",","it","assumes","the","histogram","was","already","calculated","in","`","values","`","For","example",":","..","code-block",":",":","py","vector_series","=","np.random.randint","(","10",",","size=10",")",".reshape","(","2,5",")","logger.report_histogram","(","title='histogram","example","'",",","series='histogram","series","'",",","values=vector_series",",","iteration=0",",","labels=","[","'","A","'",",","'","B","'","]",",","xaxis=","'","X","axis","label","'",",","yaxis=","'","Y","axis","label","'",")","You","can","view","the","reported","histograms","in","the","*","*","ClearML","Web-App","(","UI",")","*","*",",","*","*","RESULTS","*","*","tab",",","*","*","PLOTS","*","*","sub-tab",".",":","param","title",":","The","title","(","metric",")","of","the","plot",".",":","param","series",":","The","series","name","(","variant",")","of","the","reported","histogram",".",":","param","values",":","The","series","values",".","A","list","of","floats",",","or","an","N-dimensional","Numpy","array","containing","data","for","each","histogram","bar",".",":","param","iteration",":","The","reported","iteration","\/","step",".","Each","``","iteration","``","creates","another","plot",".",":","param","labels",":","Labels","for","each","bar","group",",","creating","a","plot","legend","labeling","each","series",".","(","Optional",")",":","param","xlabels",":","Labels","per","entry","in","each","bucket","in","the","histogram","(","vector",")",",","creating","a","set","of","labels","for","each","histogram","bar","on","the","x-axis",".","(","Optional",")",":","param","xaxis",":","The","x-axis","title",".","(","Optional",")",":","param","yaxis",":","The","y-axis","title",".","(","Optional",")",":","param","mode",":","Multiple","histograms","mode",",","stack","\/","group","\/","relative",".","Default","is","'group","'",".",":","param","data_args",":","optional","dictionary","for","data","configuration",",","passed","directly","to","plotly","See","full","details","on","the","supported","configuration",":","https",":","\/\/plotly.com\/javascript\/reference\/bar\/","example",":","data_args=","{","'orientation","'",":","'","h","'",",","'marker","'",":","{","'color","'",":","'blue","'","}","}",":","param","extra_layout",":","optional","dictionary","for","layout","configuration",",","passed","directly","to","plotly","See","full","details","on","the","supported","configuration",":","https",":","\/\/plotly.com\/javascript\/reference\/bar\/","example",":","extra_layout=","{","'xaxis","'",":","{","'type","'",":","'date","'",",","'range","'",":","[","'2020-01-01","'",",","'2020-01-31","'","]","}","}"]
code: def report_histogram(
      self,
      title,  # type: str
      series,  # type: str
      values,  # type: Sequence[Union[int, float]]
      iteration=None,  # type: Optional[int]
      labels=None,  # type: Optional[List[str]]
      xlabels=None,  # type: Optional[List[str]]
      xaxis=None,  # type: Optional[str]
      yaxis=None,  # type: Optional[str]
      mode=None,  # type: Optional[str]
      data_args=None,  # type: Optional[dict]
      extra_layout=None,  # type: Optional[dict]
  ):
      """
      For explicit reporting, plot a (default grouped) histogram.
      Notice this function will not calculate the histogram,
      it assumes the histogram was already calculated in `values`
  
      For example:
  
      .. code-block:: py
  
         vector_series = np.random.randint(10, size=10).reshape(2,5)
         logger.report_histogram(title='histogram example', series='histogram series',
              values=vector_series, iteration=0, labels=['A','B'], xaxis='X axis label', yaxis='Y axis label')
  
      You can view the reported histograms in the **ClearML Web-App (UI)**, **RESULTS** tab, **PLOTS** sub-tab.
  
      :param title: The title (metric) of the plot.
      :param series: The series name (variant) of the reported histogram.
      :param values: The series values. A list of floats, or an N-dimensional Numpy array containing
          data for each histogram bar.
      :param iteration: The reported iteration / step. Each ``iteration`` creates another plot.
      :param labels: Labels for each bar group, creating a plot legend labeling each series. (Optional)
      :param xlabels: Labels per entry in each bucket in the histogram (vector), creating a set of labels
          for each histogram bar on the x-axis. (Optional)
      :param xaxis: The x-axis title. (Optional)
      :param yaxis: The y-axis title. (Optional)
      :param mode: Multiple histograms mode, stack / group / relative. Default is 'group'.
      :param data_args: optional dictionary for data configuration, passed directly to plotly
          See full details on the supported configuration: https://plotly.com/javascript/reference/bar/
          example: data_args={'orientation': 'h', 'marker': {'color': 'blue'}}
      :param extra_layout: optional dictionary for layout configuration, passed directly to plotly
          See full details on the supported configuration: https://plotly.com/javascript/reference/bar/
          example: extra_layout={'xaxis': {'type': 'date', 'range': ['2020-01-01', '2020-01-31']}}
      """
  
      if not isinstance(values, np.ndarray):
          values = np.array(values)
  
      # if task was not started, we have to start it
      self._start_task_if_needed()
      self._touch_title_series(title, series)
      # noinspection PyProtectedMember
      return self._task._reporter.report_histogram(
          title=title,
          series=series,
          histogram=values,
          iter=iteration or 0,
          labels=labels,
          xlabels=xlabels,
          xtitle=xaxis,
          ytitle=yaxis,
          mode=mode or "group",
          data_args=data_args,
          layout_config=extra_layout,
      )
  
imports: import logging
  import math
  import warnings
  from typing import Any, Sequence, Union, List, Optional, Tuple, Dict, TYPE_CHECKING
  import numpy
  import six
  from PIL import Image
  from pathlib2 import Path
  from .debugging.log import LoggerRoot
  from .backend_interface.logger import StdStreamPatch
  from .backend_interface.task import Task
  from .backend_interface.task.log import TaskHandler
  from .backend_interface.util import mutually_exclusive
  from .backend_interface.metrics.events import UploadEvent, MetricsEventAdapter
  from .config import running_remotely, get_cache_dir, config, DEBUG_SIMULATE_REMOTE_TASK, deferred_config
  from .errors import UsageError
  from .storage.helper import StorageHelper
  from .utilities.plotly_reporter import SeriesInfo
label_desc: Use image node_id 7 for calling the Logger obj's underlying member method code with example usage: obj.report_histogram(title, series, values, iteration, labels, xlabels, xaxis, yaxis, mode, data_args, extra_layout) and returns: self