fix: get searcher metric val from column that actually exists
@@ -471,8 +471,8 @@ func (a *apiServer) GetExperiments(
WHERE t.experiment_id = e.id
ORDER BY (CASE
WHEN coalesce((config->'searcher'->>'smaller_is_better')::boolean, true)
- THEN (t.metrics->'validation_metrics'->>(e.config->'searcher'->>'metric'))::float8
- ELSE -1.0 * (t.metrics->'validation_metrics'->>(e.config->'searcher'->>'metric'))::float8
+ THEN searcher_metric_value
+ ELSE -1.0 * searcher_metric_value
END) ASC
LIMIT 1
) AS best_trial`)
@@ -502,8 +502,8 @@ func (a *apiServer) GetExperiments(
WHERE t.experiment_id = e.id
ORDER BY (CASE
WHEN coalesce((config->'searcher'->>'smaller_is_better')::boolean, true)
- THEN (t.metrics->'validation_metrics'->>(e.config->'searcher'->>'metric'))::float8
- ELSE -1.0 * (t.metrics->'validation_metrics'->>(e.config->'searcher'->>'metric'))::float8
+ THEN searcher_metric_value
+ ELSE -1.0 * searcher_metric_value
END) ASC
LIMIT 1
) `,
