StringChaos commited on
Commit
487e952
·
1 Parent(s): 6fe41a3

question id and problem_idx

Browse files
Files changed (3) hide show
  1. app.py +3 -0
  2. templates/problem.html +2 -1
  3. templates/problem_mini.html +1 -1
app.py CHANGED
@@ -14,6 +14,7 @@ with open("problems.json") as f:
14
  problem_choices = [q["question_title"] for q in problems]
15
 
16
  random_idxs = list(range(len(problems)))
 
17
  random.shuffle(random_idxs)
18
  problems = [problems[idx] for idx in random_idxs]
19
 
@@ -101,6 +102,7 @@ def problem(problem_idx):
101
  return render_template(
102
  "problem.html",
103
  problem_idx=problem_idx,
 
104
  evaluation=evaluation,
105
  models=all_models,
106
  question=question,
@@ -149,6 +151,7 @@ def problem_mini(problem_idx):
149
  return render_template(
150
  "problem_mini.html",
151
  problem_idx=problem_idx,
 
152
  evaluation=evaluation,
153
  models=mini_models,
154
  question=question,
 
14
  problem_choices = [q["question_title"] for q in problems]
15
 
16
  random_idxs = list(range(len(problems)))
17
+ random.seed(42)
18
  random.shuffle(random_idxs)
19
  problems = [problems[idx] for idx in random_idxs]
20
 
 
102
  return render_template(
103
  "problem.html",
104
  problem_idx=problem_idx,
105
+ question_id=all_evaluations_by_problem_colored[problem_idx][3],
106
  evaluation=evaluation,
107
  models=all_models,
108
  question=question,
 
151
  return render_template(
152
  "problem_mini.html",
153
  problem_idx=problem_idx,
154
+ question_id=all_evaluations_by_problem_colored[problem_idx][3],
155
  evaluation=evaluation,
156
  models=mini_models,
157
  question=question,
templates/problem.html CHANGED
@@ -175,7 +175,8 @@
175
  </head>
176
 
177
  <body>
178
- <h1><a href="{{ question['url'] }}">Problem {{ problem_idx }}</a></h1>
 
179
 
180
 
181
  <div class="button-container">
 
175
  </head>
176
 
177
  <body>
178
+ <h1><a href="{{ question['url'] }}">{{ question_id }} (Server Idx: {{ problem_idx }})</a>
179
+ </h1>
180
 
181
 
182
  <div class="button-container">
templates/problem_mini.html CHANGED
@@ -173,7 +173,7 @@
173
  </head>
174
 
175
  <body>
176
- <h1><a href="{{ question['url'] }}">Problem {{ problem_idx }}</a></h1>
177
 
178
 
179
  <div class="button-container">
 
173
  </head>
174
 
175
  <body>
176
+ <h1><a href="{{ question['url'] }}">{{ question_id }} (Server Idx: {{ problem_idx }})</a> </h1>
177
 
178
 
179
  <div class="button-container">