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
Hi, Trying To Report A Matplotlib Figure With

Hi, trying to report a matplotlib figure with report_interactive=True . Whenever I add annotations to the plot, itโ€™s reporting it to the debug samples section (as an image).
Does anyone has an idea why this happens and how can I report it to the plots section?

thanks in advance

fig, ax = plt.subplots(1, 1)
ax.plot(fpr, tpr, "o-", label="ROC curve")
ax.plot(np.linspace(0, 1, 10), np.linspace(0, 1, 10), label="diagonal", linestyle="--")
for x, y, txt in zip(fpr, tpr, thresholds):
ax.annotate(np.round(txt, 2), (x, y - 0.04))

logger.report_matplotlib_figure("ROC curve", "ROC curve", iteration=0, figure=fig, report_interactive=True)

  
  
Posted one year ago
Votes Newest

Answers 7


@<1566596968673710080:profile|QuaintRobin7> not for now. Could you please open a GH issue about it? Maybe we can fit this in a future patch.

  
  
Posted one year ago

I just wanted it to go to the plots section

  
  
Posted one year ago

it actually goes into debug samples so its working as expected. I guess there is nothing we can do about it then?

  
  
Posted one year ago

Hi @<1566596968673710080:profile|QuaintRobin7> ! Sometimes, ClearML is not capable of transforming matplotlib plots to plotly , so we report the plot as an image to Debug Samples. Looks like report_interactive=True makes the plot unparsable

  
  
Posted one year ago

thank you for the reply, i think this will do ๐Ÿ™‚

  
  
Posted one year ago

from clearml import Task
from matplotlib import pyplot as plt
import numpy as np

task = Task.init(
    project_name="Example",
    task_name="Example",
    auto_connect_frameworks={"matplotlib": False},
)
logger = task.get_logger()

fpr, tpr, thresholds = np.random.rand(3, 10)

fig, ax = plt.subplots(1, 1)
ax.plot(fpr, tpr, "o-", label="ROC curve")
ax.plot(np.linspace(0, 1, 10), np.linspace(0, 1, 10), label="diagonal", linestyle="--")
for x, y, txt in zip(fpr, tpr, thresholds):
    ax.annotate(np.round(txt, 2), (x, y - 0.04))
logger.report_matplotlib_figure(
    "ROC curve", "ROC curve", iteration=0, figure=fig, report_interactive=True
)
  
  
Posted one year ago

Hi @<1566596968673710080:profile|QuaintRobin7> , do you have a self contained snippet that will reproduce this?

  
  
Posted one year ago
787 Views
7 Answers
one year ago
one year ago
Tags