hyperdash-sdk-py
hyperdash-sdk-py copied to clipboard
Is it possible to send picture as log?
It would be grate to send binary or base64 encoded image through hyperdash, we could generate these image using matplotlib
Hey @Earthson,
This is definitely a feature we're interested in building, although we're probably going to build first-class support for tracking hyperparameters and epoch-level metrics (like loss/accuracy, etc etc) first
@Earthson here is an idea on an API that would let you send base64 images.
from hyperdash import Experiment
import matplotlib.pyplot as plt
import io
import urllib, base64
exp = Experiment("Model Name")
# ... Create data / model ...
# Matplotlib Plot (Skip for another base64 image source)
plt.plot(range(10))
# Save plot
fig = plt.gcf()
buf = io.BytesIO()
fig.savefig(buf, format='png')
buf.seek(0)
# Get base64 image
img = base64.b64encode(buf.read())
# Send base64 encoded image to Hyperdash servers, associated with experiment
exp.image_base64(img)
exp.end()
Then you'd be able to see the image next to your logs, hyperparameters, and performance metrics on the web and mobile clients.
Perhaps a more ideal API... a function that lets you directly do:
plt.plot(range(10))
fig = plt.gcf()
exp.save_fig(fig)
But we'd need an approach such that matplotlib wasn't a required Hyperdash dependency.
I think it is a good idea.
Is it possible to provide an optional image_id for overwritable image?