tfrere commited on
Commit
f902774
·
1 Parent(s): 1e1eb3f

update api routes

Browse files
backend/data/lighteval_results/lighteval_results.json CHANGED
@@ -23,8 +23,8 @@
23
  {
24
  "model": "deepseek-ai/DeepSeek-R1-Distill-Llama-70B",
25
  "provider": "sambanova",
26
- "accuracy": 0.0,
27
- "execution_time": 60.0,
28
- "status": "timeout"
29
  }
30
  ]
 
23
  {
24
  "model": "deepseek-ai/DeepSeek-R1-Distill-Llama-70B",
25
  "provider": "sambanova",
26
+ "accuracy": 1.0,
27
+ "execution_time": 27.880253076553345,
28
+ "status": "success"
29
  }
30
  ]
backend/data/lighteval_results/results/deepseek-ai/DeepSeek-R1-Distill-Llama-70B/results_2025-03-28T12-59-46.530720.json ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "config_general": {
3
+ "lighteval_sha": "?",
4
+ "num_fewshot_seeds": 1,
5
+ "override_batch_size": null,
6
+ "max_samples": 30,
7
+ "job_id": 0,
8
+ "start_time": 193754.29830825,
9
+ "end_time": 193775.660671041,
10
+ "total_evaluation_time_secondes": "21.362362790998304",
11
+ "model_name": "deepseek-ai/DeepSeek-R1-Distill-Llama-70B",
12
+ "model_sha": "",
13
+ "model_dtype": null,
14
+ "model_size": "",
15
+ "generation_parameters": {
16
+ "early_stopping": null,
17
+ "repetition_penalty": null,
18
+ "frequency_penalty": null,
19
+ "length_penalty": null,
20
+ "presence_penalty": null,
21
+ "max_new_tokens": null,
22
+ "min_new_tokens": null,
23
+ "seed": null,
24
+ "stop_tokens": null,
25
+ "temperature": null,
26
+ "top_k": null,
27
+ "min_p": null,
28
+ "top_p": null,
29
+ "truncate_prompt": null,
30
+ "response_format": null
31
+ }
32
+ },
33
+ "results": {
34
+ "custom|yourbench|0": {
35
+ "accuracy": 1.0,
36
+ "accuracy_stderr": 0.0
37
+ },
38
+ "all": {
39
+ "accuracy": 1.0,
40
+ "accuracy_stderr": 0.0
41
+ }
42
+ },
43
+ "versions": {
44
+ "custom|yourbench|0": 0
45
+ },
46
+ "config_tasks": {
47
+ "custom|yourbench": {
48
+ "name": "yourbench",
49
+ "prompt_function": "yourbench_prompt",
50
+ "hf_repo": "yourbench/yourbench_d0766aeb-d261-4f0f-870c-537432fd8584",
51
+ "hf_subset": "multi_hop_questions",
52
+ "metric": [
53
+ {
54
+ "metric_name": [
55
+ "accuracy"
56
+ ],
57
+ "higher_is_better": {
58
+ "accuracy": true
59
+ },
60
+ "category": "7",
61
+ "use_case": "1",
62
+ "sample_level_fn": "compute",
63
+ "corpus_level_fn": {
64
+ "accuracy": "mean"
65
+ }
66
+ }
67
+ ],
68
+ "hf_revision": null,
69
+ "hf_filter": null,
70
+ "hf_avail_splits": [
71
+ "train"
72
+ ],
73
+ "trust_dataset": true,
74
+ "evaluation_splits": [
75
+ "train"
76
+ ],
77
+ "few_shots_split": null,
78
+ "few_shots_select": null,
79
+ "generation_size": 8192,
80
+ "generation_grammar": null,
81
+ "stop_sequence": [],
82
+ "num_samples": null,
83
+ "suite": [
84
+ "custom"
85
+ ],
86
+ "original_num_docs": 34,
87
+ "effective_num_docs": 30,
88
+ "must_remove_duplicate_docs": false,
89
+ "version": 0
90
+ }
91
+ },
92
+ "summary_tasks": {
93
+ "custom|yourbench|0": {
94
+ "hashes": {
95
+ "hash_examples": "8deb6ee598efe642",
96
+ "hash_full_prompts": "ee276216c7fba0dc",
97
+ "hash_input_tokens": "79ab129e9a18c6d6",
98
+ "hash_cont_tokens": "79ab129e9a18c6d6"
99
+ },
100
+ "truncated": 0,
101
+ "non_truncated": 30,
102
+ "padded": 0,
103
+ "non_padded": 30,
104
+ "effective_few_shots": 0.0,
105
+ "num_truncated_few_shots": 0
106
+ }
107
+ },
108
+ "summary_general": {
109
+ "hashes": {
110
+ "hash_examples": "134194cd9d247350",
111
+ "hash_full_prompts": "59b03121730720e8",
112
+ "hash_input_tokens": "05a66e44e190c178",
113
+ "hash_cont_tokens": "05a66e44e190c178"
114
+ },
115
+ "truncated": 0,
116
+ "non_truncated": 30,
117
+ "padded": 0,
118
+ "non_padded": 30,
119
+ "num_truncated_few_shots": 0
120
+ }
121
+ }
frontend/server.js CHANGED
@@ -30,22 +30,7 @@ app.use((req, res, next) => {
30
  next();
31
  });
32
 
33
- // Proxy all backend routes to the Python backend
34
- app.use(
35
- createProxyMiddleware({
36
- target: backendUrl,
37
- changeOrigin: true,
38
- pathRewrite: {
39
- "^/api": "", // Remove /api prefix if present
40
- },
41
- onError: (err, req, res) => {
42
- console.error("Proxy Error:", err);
43
- res.status(500).json({ error: "Proxy Error", details: err.message });
44
- },
45
- })
46
- );
47
-
48
- // Serve static files from the build directory
49
  app.use(
50
  express.static(path.join(__dirname, "build"), {
51
  // Don't cache HTML files
@@ -62,6 +47,33 @@ app.use(
62
  })
63
  );
64
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  // Handle all other routes by serving index.html
66
  app.get("*", (req, res) => {
67
  // Headers for client-side routing
 
30
  next();
31
  });
32
 
33
+ // Serve static files from the build directory first
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  app.use(
35
  express.static(path.join(__dirname, "build"), {
36
  // Don't cache HTML files
 
47
  })
48
  );
49
 
50
+ // Proxy only API routes to the Python backend
51
+ app.use(
52
+ [
53
+ "/health",
54
+ "/upload",
55
+ "/generate-benchmark",
56
+ "/config-logs",
57
+ "/benchmark-logs",
58
+ "/benchmark-questions",
59
+ "/evaluate-benchmark",
60
+ "/evaluation-logs",
61
+ "/evaluation-results",
62
+ "/download-dataset",
63
+ ],
64
+ createProxyMiddleware({
65
+ target: backendUrl,
66
+ changeOrigin: true,
67
+ pathRewrite: {
68
+ "^/api": "", // Remove /api prefix if present
69
+ },
70
+ onError: (err, req, res) => {
71
+ console.error("Proxy Error:", err);
72
+ res.status(500).json({ error: "Proxy Error", details: err.message });
73
+ },
74
+ })
75
+ );
76
+
77
  // Handle all other routes by serving index.html
78
  app.get("*", (req, res) => {
79
  // Headers for client-side routing