From 39ba074b70499126eedfe456c2fc151d405112cd Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Thu, 20 Jun 2019 03:32:15 +0300 Subject: [PATCH] Add report_histogram is the same as report_vector --- trains/logger.py | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/trains/logger.py b/trains/logger.py index 7d8d4c96..2b3e6dcb 100644 --- a/trains/logger.py +++ b/trains/logger.py @@ -193,7 +193,29 @@ class Logger(object): :type values: [float] :param iteration: Iteration number :type iteration: int - :param labels: optional label per entry in the vector (for histogram) + :param labels: optional, labels for each bar group. + :type labels: list of strings. + :param xlabels: optional label per entry in the vector (bucket in the histogram) + :type xlabels: list of strings. + """ + return self.report_histogram(title, series, values, iteration, labels=labels, xlabels=xlabels) + + def report_histogram(self, title, series, values, iteration, labels=None, xlabels=None): + """ + Report a histogram plot + + :param title: Title (AKA metric) + :type title: str + :param series: Series (AKA variant) + :type series: str + :param values: Reported values (or numpy array) + :type values: [float] + :param iteration: Iteration number + :type iteration: int + :param labels: optional, labels for each bar group. + :type labels: list of strings. + :param xlabels: optional label per entry in the vector (bucket in the histogram) + :type xlabels: list of strings. """ if not isinstance(values, np.ndarray):