Skip to content

Commit

Permalink
Format Python code with psf/black push (#281)
Browse files Browse the repository at this point in the history
There appear to be some python formatting errors in
f604f40. This pull request
uses the [psf/black](https://github.com/psf/black) formatter to fix
these issues.
  • Loading branch information
mzouink authored Jul 31, 2024
2 parents 24c963a + 7f534cf commit 86d2bb9
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions dacapo/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@

import os




RunInfo = namedtuple(
"RunInfo",
[
Expand Down Expand Up @@ -448,14 +447,22 @@ def plot_runs(
criteria=run.validation_score_name
)
colors_val = itertools.cycle(plt.cm.tab20.colors)
for dataset,color_v in zip(run.validation_scores.datasets,colors_val):
for dataset, color_v in zip(run.validation_scores.datasets, colors_val):
dataset_data = validation_score_data.sel(datasets=dataset)
include_validation_figure = True
x = [score.iteration for score in run.validation_scores.scores]
cc = next(colors_val)
for i in range(dataset_data.data.shape[1]):
current_name = f"{i}_{dataset.name}_{name}_{run.validation_score_name}"
validation_ax.plot(x, dataset_data.data[:,i] , label=current_name, color=cc, alpha=0.5+0.2*i)
current_name = (
f"{i}_{dataset.name}_{name}_{run.validation_score_name}"
)
validation_ax.plot(
x,
dataset_data.data[:, i],
label=current_name,
color=cc,
alpha=0.5 + 0.2 * i,
)
print("VALIDATION PLOTTED")

if include_loss_figure:
Expand All @@ -471,4 +478,4 @@ def plot_runs(
validation_ax.legend()

plt.tight_layout()
plt.show()
plt.show()

0 comments on commit 86d2bb9

Please sign in to comment.