Skip to content

Commit

Permalink
Fix issue where the run_eval progress disappeared. We triggerd loadin…
Browse files Browse the repository at this point in the history
…g, which tool the whole svelte componenet out of dom
  • Loading branch information
scosman committed Feb 26, 2025
1 parent 36c064d commit 935092f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,8 @@
let score_summary: EvalResultSummary | null = null
let score_summary_error: KilnError | null = null
let score_summary_loading = false
$: loading =
eval_loading ||
eval_configs_loading ||
task_run_configs_loading ||
score_summary_loading
$: loading = eval_loading || eval_configs_loading || task_run_configs_loading
$: error = eval_error || eval_configs_error || task_run_configs_error
// Note: not including score_summary_error, because it's not a critical error we should block the UI for
Expand Down Expand Up @@ -174,7 +169,7 @@
return
}
try {
score_summary_loading = true
score_summary = null
const { data, error } = await client.GET(
"/api/projects/{project_id}/tasks/{task_id}/eval/{eval_id}/eval_config/{eval_config_id}/score_summary",
{
Expand All @@ -194,8 +189,6 @@
score_summary = data
} catch (error) {
score_summary_error = createKilnError(error)
} finally {
score_summary_loading = false
}
}
Expand Down Expand Up @@ -620,11 +613,11 @@
? 'text-error'
: 'text-gray-500'}"
>
Eval {(percent_complete * 100.0).toFixed(1)}% complete
{(percent_complete * 100.0).toFixed(1)}% complete
</div>
{:else if score_summary}
<!-- We have results, but not for this run config -->
<div class="text-sm text-error">Eval 0% complete</div>
<div class="text-sm text-error">0% complete</div>
{/if}
</td>
{#each evaluator.output_scores as output_score}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,10 @@
let score_summary: EvalConfigCompareSummary | null = null
let score_summary_error: KilnError | null = null
let score_summary_loading = false
let score_type: "mse" | "mae" | "norm_mse" | "norm_mae" = "norm_mse"
$: loading = eval_loading || eval_configs_loading || score_summary_loading
$: loading = eval_loading || eval_configs_loading // Score summary not blocking whole UI
$: error = eval_error || eval_configs_error || score_summary_error
$: run_eval_url = `${base_url}/api/projects/${$page.params.project_id}/tasks/${$page.params.task_id}/eval/${$page.params.eval_id}/run_eval_config_eval`
Expand Down Expand Up @@ -123,7 +122,6 @@
async function get_score_summary() {
score_summary = null
try {
score_summary_loading = true
const { data, error } = await client.GET(
"/api/projects/{project_id}/tasks/{task_id}/eval/{eval_id}/eval_configs_score_summary",
{
Expand All @@ -142,8 +140,6 @@
score_summary = data
} catch (error) {
score_summary_error = createKilnError(error)
} finally {
score_summary_loading = false
}
}
Expand Down

0 comments on commit 935092f

Please sign in to comment.