Spaces:
Sleeping
Sleeping
Commit
·
6ea7ebc
1
Parent(s):
fbe4613
More logging
Browse files- tests/analysis.py +5 -5
tests/analysis.py
CHANGED
|
@@ -78,11 +78,11 @@ def grade_attempt(file_path, grader_model, attempt_index):
|
|
| 78 |
|
| 79 |
def complete_and_grade(interview_params, exp_name, grader_models, candidate_model):
|
| 80 |
interview_type, attempt_num, llm_config = interview_params
|
|
|
|
|
|
|
| 81 |
try:
|
| 82 |
file_path, _ = complete_interview(interview_type, exp_name, llm_config, model=candidate_model)
|
| 83 |
-
print(f"Attempt {attempt_num + 1} of {interview_type} completed successfully")
|
| 84 |
-
|
| 85 |
-
feedback_list = []
|
| 86 |
for i, grader_model in enumerate(grader_models):
|
| 87 |
feedback = grade_attempt(file_path, grader_model, i)
|
| 88 |
if feedback:
|
|
@@ -91,10 +91,10 @@ def complete_and_grade(interview_params, exp_name, grader_models, candidate_mode
|
|
| 91 |
print(f"Overall score: {feedback['overall_score']}")
|
| 92 |
|
| 93 |
except Exception as e:
|
| 94 |
-
print(f"Attempt {attempt_num + 1} of {interview_type} failed with error: {e}")
|
| 95 |
|
| 96 |
if len(feedback_list) == 0:
|
| 97 |
-
print(f"Attempt {attempt_num + 1} of {interview_type} returned an empty list")
|
| 98 |
|
| 99 |
return feedback_list
|
| 100 |
|
|
|
|
| 78 |
|
| 79 |
def complete_and_grade(interview_params, exp_name, grader_models, candidate_model):
|
| 80 |
interview_type, attempt_num, llm_config = interview_params
|
| 81 |
+
|
| 82 |
+
feedback_list = []
|
| 83 |
try:
|
| 84 |
file_path, _ = complete_interview(interview_type, exp_name, llm_config, model=candidate_model)
|
| 85 |
+
print(f"Attempt {attempt_num + 1} interview simulation of {interview_type} by {llm_config.name} completed successfully")
|
|
|
|
|
|
|
| 86 |
for i, grader_model in enumerate(grader_models):
|
| 87 |
feedback = grade_attempt(file_path, grader_model, i)
|
| 88 |
if feedback:
|
|
|
|
| 91 |
print(f"Overall score: {feedback['overall_score']}")
|
| 92 |
|
| 93 |
except Exception as e:
|
| 94 |
+
print(f"Attempt {attempt_num + 1} of {interview_type} by {llm_config.name} failed with error: {e}")
|
| 95 |
|
| 96 |
if len(feedback_list) == 0:
|
| 97 |
+
print(f"Attempt {attempt_num + 1} of {interview_type} by {llm_config.name} returned an empty list")
|
| 98 |
|
| 99 |
return feedback_list
|
| 100 |
|