braceal / molecules

Machine learning for molecular dynamics.
MIT License
5 stars 5 forks source link

Add plotly plot to wandb log #71

Closed braceal closed 3 years ago

braceal commented 3 years ago

Add interactive tsne visualization chart to molecules.plot wandb allows you to pass a custom html string

TODO: play around with this to test it use the plot figure object and call to_html() https://plotly.com/python-api-reference/generated/plotly.graph_objects.Figure.html#plotly.graph_objects.Figure.to_html

Then use wandb api: https://docs.wandb.com/library/log#media

wandb.log({"custom_string": wandb.Html(fig.to_html())})

Then save html file to disk: plotly.offline.plot(fig, filename='plot.html')

braceal commented 3 years ago

Done.