Unanswered
Hi, Trying To Report A Matplotlib Figure With
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
)
142 Views
0
Answers
one year ago
one year ago