From 996498fa2f22a8417e385bd268ed10fb80de7125 Mon Sep 17 00:00:00 2001 From: Brian Wylie Date: Wed, 27 Mar 2024 08:53:06 -0600 Subject: [PATCH] set training_holdout as the default when available --- applications/aws_dashboard/pages/models/callbacks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/applications/aws_dashboard/pages/models/callbacks.py b/applications/aws_dashboard/pages/models/callbacks.py index 24040a552..b261d147a 100644 --- a/applications/aws_dashboard/pages/models/callbacks.py +++ b/applications/aws_dashboard/pages/models/callbacks.py @@ -107,11 +107,11 @@ def generate_inference_dropdown_figure(selected_rows, table_data): if not inference_runs: return [], None - # Set the first inference run as the selected value - first_inference_run = inference_runs[0] + # Set "training_holdout" as the default, if that doesn't exist, set the first + default_inference_run = "training_holdout" if "training_holdout" in inference_runs else inference_runs[0] # Return the options for the dropdown and the selected value - return inference_runs, first_inference_run + return inference_runs, default_inference_run # Updates the model metrics when a model row is selected