How to use Neptune with Seaborn#
Seaborn is a library for making statistical graphics in Python. With Neptune, you can log and display Seaborn figures as PNG images.
See in Neptune  Example script 
Before you start#
- Sign up at neptune.ai/register.
- Create a project for storing your metadata.
-
Have Seaborn and Neptune installed:
Tip
To follow the guide without any setup, run the example notebook in Colab
Seaborn logging example#
-
Import Neptune and start a run:
-
If you haven't set up your credentials, you can log anonymously:
-
-
Create a sample figure:
-
Log the figure to the run:
If using neptune
<1.9.x
Seaborn figure support was added in version
1.9.0
of the Neptune client library.On older versions, you need to access the
.figure
property of the Seaborn figure: -
To stop the connection to Neptune and sync all data, call the
stop()
method: -
Run your script as you normally would.
To open the run, click the Neptune link that appears in the console output.
[neptune] [info ] Neptune initialized. Open in the app:
https://app.neptune.ai/workspace/project/e/RUN-1
Result
You can find the resulting figure in the Images tab.
Logging a series of Seaborn images#
To log a series of Seaborn figures, use append()
inside a loop:
for epoch in range(params["iterations"]):
seaborn_fig = ...
run["train/distribution"].append(seaborn_fig)
If using neptune <1.9.x
Seaborn figure support was added in version 1.9.0
of the Neptune client library.
On older versions, you need to access the .figure
property of the Seaborn figure: