Spaces:
Sleeping
Sleeping
aishani-s20 commited on
Commit ·
e0905ca
1
Parent(s): 1079ca1
updated inference for grader
Browse files- inference.py +3 -3
inference.py
CHANGED
|
@@ -186,9 +186,9 @@ async def main() -> None:
|
|
| 186 |
if not result.observation.metadata:
|
| 187 |
result.observation.metadata = {}
|
| 188 |
result.observation.metadata["initial_count"] = initial_gate_count
|
| 189 |
-
|
| 190 |
-
# Fetch the correct grader safely
|
| 191 |
-
grader = GRADERS.get(actual_task, GRADERS
|
| 192 |
score = grader(result.observation)
|
| 193 |
success = score >= SUCCESS_SCORE_THRESHOLD
|
| 194 |
|
|
|
|
| 186 |
if not result.observation.metadata:
|
| 187 |
result.observation.metadata = {}
|
| 188 |
result.observation.metadata["initial_count"] = initial_gate_count
|
| 189 |
+
|
| 190 |
+
# Fetch the correct grader safely, falling back to the hard grader if the task name is missing
|
| 191 |
+
grader = GRADERS.get(actual_task, GRADERS["hard"])
|
| 192 |
score = grader(result.observation)
|
| 193 |
success = score >= SUCCESS_SCORE_THRESHOLD
|
| 194 |
|