Save feature importance figures to mlflow
upura opened this issue · comments
Shotaro Ishihara commented
Harutaka Kawamura commented
You can use log_figure
instead of log_image
to log figures (matplotlib or plotly). This is a bit confusing but log_image
logs an object that represents an image (e.g. numpy array).
# matplotlib workflow
# plt.xxx style
plt.plot(...)
mlflow.log_figure(plt.gcf(), "figure.png")
# ax.xxx style
fig, ax = plt.subplots()
ax.plot(...)
mlflow.log_figure(fig, "figure.png")
Shotaro Ishihara commented
Oh, I didn't know that. Thanks for pointing out.