Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

fix: move datasetConfigs to module scope for chart rendering (#1242)

LearningCircuitda4056e3e3b6
diff --git a/src/local_deep_research/config/thread_settings.py b/src/local_deep_research/config/thread_settings.py
index 5be5dfeb51..03506ca5fa 100644
--- a/src/local_deep_research/config/thread_settings.py
+++ b/src/local_deep_research/config/thread_settings.py
@@ -58,19 +58,25 @@ def get_setting_from_snapshot(
value = None
if settings_snapshot and key in settings_snapshot:
value = settings_snapshot[key]
- value = get_typed_setting_value(
- key,
- value["value"],
- value.get("ui_element", "text"), # Default to "text" if missing
- )
+ # Handle both full format {"value": x} and simplified format (just x)
+ if isinstance(value, dict) and "value" in value:
+ value = get_typed_setting_value(
+ key,
+ value["value"],
+ value.get("ui_element", "text"), # Default to "text" if missing
+ )
+ # else: value is already the raw value from simplified snapshot
# Search for child keys.
elif settings_snapshot:
for k, v in settings_snapshot.items():
if k.startswith(f"{key}."):
k = k.removeprefix(f"{key}.")
- v = get_typed_setting_value(
- key, v["value"], v.get("ui_element", "text")
- ) # Default to "text" if missing
+ # Handle both full format {"value": x} and simplified format (just x)
+ if isinstance(v, dict) and "value" in v:
+ v = get_typed_setting_value(
+ key, v["value"], v.get("ui_element", "text")
+ ) # Default to "text" if missing
+ # else: v is already the raw value from simplified snapshot
if value is None:
value = {k: v}
else:
diff --git a/src/local_deep_research/web/templates/pages/benchmark.html b/src/local_deep_research/web/templates/pages/benchmark.html
index bd7c55437d..ced39858f9 100644
--- a/src/local_deep_research/web/templates/pages/benchmark.html
+++ b/src/local_deep_research/web/templates/pages/benchmark.html
@@ -1041,6 +1041,39 @@ let chartData = {
searchResultCounts: []
};
+// Dataset configurations for accuracy charts (must be at module scope for updateCharts and loadHistoricalChartData)
+const datasetConfigs = [
+ {
+ key: 'overall',
+ label: 'Overall Accuracy',
+ borderColor: '#4caf50',
+ backgroundColor: 'rgba(76, 175, 80, 0.1)',
+ fill: true
+ },
+ {
+ key: 'simpleqa',
+ label: 'SimpleQA Accuracy',
+ borderColor: '#2196f3',
+ backgroundColor: 'rgba(33, 150, 243, 0.1)',
+ fill: false
+ },
+ {
+ key: 'browsecomp',
+ label: 'BrowseComp Accuracy',
+ borderColor: '#ff9800',
+ backgroundColor: 'rgba(255, 152, 0, 0.1)',
+ fill: false
+ },
+ {
+ key: 'xbench_deepsearch',
+ label: 'xbench-DeepSearch Accuracy',
+ borderColor: '#9c27b0',
+ backgroundColor: 'rgba(156, 39, 176, 0.1)',
+ fill: false
+ }
+ // Add new datasets here - just add a new object with key, label, and colors
+];
+
// Search quality monitoring
let recentSearchCounts = [];
let searchQualityAlert = false;
@@ -1863,40 +1896,7 @@ function initializeCharts() {
}
};
- // Define dataset configurations in one place
- const datasetConfigs = [
- {
- key: 'overall',
- label: 'Overall Accuracy',
- borderColor: '#4caf50',
- backgroundColor: 'rgba(76, 175, 80, 0.1)',
- fill: true
- },
- {
- key: 'simpleqa',
- label: 'SimpleQA Accuracy',
- borderColor: '#2196f3',
- backgroundColor: 'rgba(33, 150, 243, 0.1)',
- fill: false
- },
- {
- key: 'browsecomp',
- label: 'BrowseComp Accuracy',
- borderColor: '#ff9800',
- backgroundColor: 'rgba(255, 152, 0, 0.1)',
- fill: false
- },
- {
- key: 'xbench_deepsearch',
- label: 'xbench-DeepSearch Accuracy',
- borderColor: '#9c27b0',
- backgroundColor: 'rgba(156, 39, 176, 0.1)',
- fill: false
- }
- // Add new datasets here - just add a new object with key, label, and colors
- ];
-
- // Build chart datasets from configuration
+ // Build chart datasets from configuration (uses global datasetConfigs)
const chartDatasets = datasetConfigs.map(config => ({
label: config.label,
data: [],
@@ -2119,7 +2119,7 @@ async function loadHistoricalChartData() {
});
timingChart.data.labels.push(i);
- timingChart.data.datasets[0].data.push(status.avg_time_per_example || 0);
+ timingChart.data.datasets[0].data.push((status.avg_time_per_example || 0) / 60); // Convert to minutes
}
accuracyChart.update();