Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add manual seaborn logging example #628

Merged
merged 27 commits into from Apr 2, 2022
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e2a6289
edit docstrings
pollfly Nov 30, 2021
2feea24
Merge branch 'allegroai:master' into master
pollfly Dec 7, 2021
7e9199c
Merge branch 'master' of https://github.com/allegroai/clearml
pollfly Dec 15, 2021
ba09d27
Merge branch 'master' of https://github.com/pollfly/clearml
pollfly Dec 21, 2021
2ce163b
Merge branch 'master' of https://github.com/allegroai/clearml
pollfly Dec 21, 2021
8eb2f99
xgboost edits
pollfly Dec 22, 2021
5113b65
Merge branch 'master' of https://github.com/allegroai/clearml
pollfly Dec 30, 2021
f56460c
change name of task_piping_example.py
pollfly Dec 30, 2021
3c578cd
Merge branch 'master' of https://github.com/allegroai/clearml
pollfly Jan 13, 2022
e424d9d
Merge branch 'master' of https://github.com/allegroai/clearml
pollfly Jan 20, 2022
7514323
allegro >>> clearml,
pollfly Jan 20, 2022
7033141
Merge branch 'master' of https://github.com/allegroai/clearml
pollfly Jan 24, 2022
2ea73ce
Merge branch 'master' of https://github.com/allegroai/clearml
pollfly Jan 27, 2022
33eb65e
Fix Saas and profile links
pollfly Jan 27, 2022
df51a61
Merge branch 'master' of https://github.com/allegroai/clearml
pollfly Jan 27, 2022
5377cb9
edit doctrings
pollfly Jan 27, 2022
1ab2452
Merge branch 'master' of https://github.com/allegroai/clearml
pollfly Feb 1, 2022
6904334
Merge branch 'master' of https://github.com/allegroai/clearml
pollfly Feb 6, 2022
7c85eda
Merge branch 'allegroai:master' into master
pollfly Feb 6, 2022
e52ee1e
Merge branch 'master' of https://github.com/allegroai/clearml
pollfly Feb 9, 2022
b72312b
Merge remote-tracking branch 'origin/master'
pollfly Feb 9, 2022
9183c48
Merge branch 'master' of https://github.com/allegroai/clearml
pollfly Feb 17, 2022
b52b4bb
Merge branch 'master' of https://github.com/allegroai/clearml
pollfly Feb 24, 2022
e37c828
Merge branch 'master' of https://github.com/allegroai/clearml
pollfly Feb 27, 2022
04fc4b6
Merge branch 'master' of https://github.com/allegroai/clearml
pollfly Mar 3, 2022
909bc2d
Merge branch 'master' of https://github.com/allegroai/clearml into se…
pollfly Mar 31, 2022
e20d463
add seaborn logging
pollfly Mar 31, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
39 changes: 28 additions & 11 deletions examples/reporting/matplotlib_manual_reporting.py
Expand Up @@ -2,15 +2,16 @@
#
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from clearml import Task

# Connecting ClearML with the current process,
# from here on everything is logged automatically
# Create a new task, disable automatic matplotlib connect
task = Task.init(
project_name='examples',
task_name='Manual Matplotlib example',
auto_connect_frameworks={'matplotlib': False}
project_name="examples",
task_name="Manual Matplotlib example",
auto_connect_frameworks={"matplotlib": False},
)

# Create plot and explicitly report as figure
Expand All @@ -21,10 +22,7 @@
area = (30 * np.random.rand(N))**2 # 0 to 15 point radii
plt.scatter(x, y, s=area, c=colors, alpha=0.5)
task.logger.report_matplotlib_figure(
title="Manual Reporting",
series="Just a plot",
iteration=0,
figure=plt,
title="Manual Reporting", series="Just a plot", iteration=0, figure=plt
)

# Show the plot
Expand All @@ -39,19 +37,38 @@
figure=plt,
report_image=True,
)
# Show the plot
plt.show()


# Create an image plot and explicitly report (as an image)
# Create image plot
m = np.eye(256, 256, dtype=np.uint8)
plt.imshow(m)
# Report plot
task.logger.report_matplotlib_figure(
title="Manual Reporting",
series="Image plot",
iteration=0,
figure=plt,
report_image=True, # Note this is required for image plots
report_interactive=False,
)
# Show plot
plt.show()

# Show the plot
# Create Seaborn plot
sns.set(style="darkgrid")
# Load an example dataset with long-form data
fmri = sns.load_dataset("fmri")
# Plot the responses for different events and regions
sns.lineplot(x="timepoint", y="signal", hue="region", style="event", data=fmri)
# Report plot
task.logger.report_matplotlib_figure(
title="Seaborn example",
series="My Plot Series 4",
iteration=10,
figure=plt,
report_interactive=False,
)
# Show plot
plt.show()

print("This is a Matplotlib & Seaborn example")