Commit e47e60f6 by Calen Pennington

Assign a score of 0 to tasks with no attempts

parent 347f0c75
...@@ -259,7 +259,11 @@ class CombinedOpenEndedV1Module(): ...@@ -259,7 +259,11 @@ class CombinedOpenEndedV1Module():
return (0, 0, state_values[self.INITITIAL], idx) return (0, 0, state_values[self.INITITIAL], idx)
final_child_state = json.loads(task_states[-1]) final_child_state = json.loads(task_states[-1])
best_score = max(attempt.get('score', 0) for attempt in final_child_state.get('child_history', [])) scores = [attempt.get('score', 0) for attempt in final_child_state.get('child_history', [])]
if scores:
best_score = max(scores)
else:
best_score = 0
return ( return (
len(task_states), len(task_states),
best_score, best_score,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment