Skip to content

Commit 559c778

Browse files
committed
Remove correct feedback messages
1 parent e5519a3 commit 559c778

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

evaluation_function/checks/run_checks.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,11 @@ def run_checks_internal(response: str, answer: str, params: dict) -> CheckResult
108108
return general_feedback
109109
response_ast = general_feedback.get_payload("ast", None)
110110

111-
correct_feedback = random.choice(["Good Job!", "Well Done!", "Awesome"])
112-
113111
# If a function test is desired, run tests to ensure that a particular function returns the
114112
# correct values
115113
check_func_name = params.get('check_func', None)
116114
if check_func_name:
117-
result = check_func(response_ast, answer_ast, check_func_name)
118-
if result.passed():
119-
result.add_message(correct_feedback)
120-
return result
115+
return check_func(response_ast, answer_ast, check_func_name)
121116

122117
# Analyse the structure of the response, and ensure that it has the same function/class
123118
# heirarchy as the correct answer.
@@ -140,9 +135,9 @@ def run_checks_internal(response: str, answer: str, params: dict) -> CheckResult
140135
diff = output_diffs(res_msg, correct_output)
141136
return CheckResult(False).add_message(markdown_format(error_feedback + diff))
142137
else:
143-
return CheckResult(True).add_message(correct_feedback)
138+
return CheckResult(True)
144139
elif check_each_letter(response, answer):
145-
return CheckResult(True).add_message(correct_feedback)
140+
return CheckResult(True)
146141

147142
# Check global variables if a check list was given
148143
check_list = params.get('global_variable_check_list', {})
@@ -157,7 +152,7 @@ def run_checks_internal(response: str, answer: str, params: dict) -> CheckResult
157152
if not check_result.passed():
158153
return CheckResult(False).add_message(markdown_format(check_result.message()))
159154
else:
160-
return CheckResult(True).add_message(correct_feedback)
155+
return CheckResult(True)
161156

162157
# If none of the tests were run, return an indeterminate result and defer to AI
163158
return CheckResult(False).add_payload("ai", True)

0 commit comments

Comments
 (0)