Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Hello Everyone! I Encountered A Very Weird Behaviour Of

Hello everyone!

I encountered a very weird behaviour of report_histogram

data = np.random.random(100) # generate 100 values from [0,1] uniform distribution
clearml_logger.report_histogram(
    title="test",
    series="test",
    values=data,
    iteration=0,
)

The result (pic.1) doesn't make sense for me.
I would expect something like seaborn output (pic.2)

sns.histplot(data)

Am I missing something or is it a bug?
image
image

  
  
Posted one year ago
Votes Newest

Answers 2


The report_histogram function doesn't make any sense in clearml. The expected values are the heights of the bars. (it assumes that you've already calculated the histogram).

I think that they should rename it to "report_bar" or something like that, and "report_histogram" will calculate the histogram for you (same as matplotlib's plt.hist function. HungryCat90

anyway, for histogram I'm using lines plots instead, it is the only way you can compare later on with other runs.

Example:
def report_hist(title:str, series:str, data:Iterable[float], bins:int, range=(0,1)):
_x = np.array(data, dtype=float)
_x = _x[~np.isnan(_x)]

if len(_x) == 0:
    return None

_hist, _bins = np.histogram(_x, bins=bins, range=range)
_bins_x = [(a+b)/2 for a,b in zip(_bins[:-1], _bins[1:])]
logger = clearml.Logger.current_logger()
logger.report_scatter2d(title, series, scatter=zip(_bins_x, _hist), mode="lines+markers")
  
  
Posted one year ago

clearml package version: '1.8.3'

  
  
Posted one year ago
1K Views
2 Answers
one year ago
one year ago
Tags