MatPlotLib into WandB

Hi @kevinashaw!

The BytesIO type is not supported by wandb.Image which is why you are running into this issue. Here are a few options that would work instead:

  • wandb.log({ 'chart' : wandb.Image(Image.open(buf)) })
  • wandb.log({ 'chart' : wandb.Image(fig) })
  • wandb.log({ 'chart' : fig }) (Please note that this does not actually save an image but an interactable Plotly chart on your workspace

Thanks,
Ramit

1 Like