From 64a508b244462e90499aea1d7407232397269564 Mon Sep 17 00:00:00 2001 From: William Patton Date: Tue, 12 Nov 2024 11:33:05 -0800 Subject: [PATCH] avoid using dataset classes for indexing, just use strings --- dacapo/experiments/validation_scores.py | 2 +- dacapo/plot.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dacapo/experiments/validation_scores.py b/dacapo/experiments/validation_scores.py index 18e2df029..08eac748c 100644 --- a/dacapo/experiments/validation_scores.py +++ b/dacapo/experiments/validation_scores.py @@ -234,7 +234,7 @@ def to_xarray(self) -> xr.DataArray: "iterations": [ iteration_score.iteration for iteration_score in self.scores ], - "datasets": self.datasets, + "datasets": [d.name for d in self.datasets], "parameters": self.parameters, "criteria": self.criteria, }, diff --git a/dacapo/plot.py b/dacapo/plot.py index 1ac82e965..5589488d7 100644 --- a/dacapo/plot.py +++ b/dacapo/plot.py @@ -427,7 +427,7 @@ def plot_runs( ) colors_val = itertools.cycle(plt.cm.tab20.colors) for dataset in run.validation_scores.datasets: - dataset_data = validation_score_data.sel(datasets=dataset) + dataset_data = validation_score_data.sel(datasets=dataset.name) include_validation_figure = True x = [score.iteration for score in run.validation_scores.scores] for i, cc in zip(range(dataset_data.data.shape[1]), colors_val):