Skip to content

Commit 581e26f

Browse files
Minor cleaning
1 parent 83dfb30 commit 581e26f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

optillm/cepo.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,12 +241,11 @@ def rate_completions_absolute(system_prompt: str, initial_query: str, client, mo
241241
rating_response = "0"
242242

243243
try:
244-
rating = float(rating_response)
245-
ratings.append(rating)
244+
ratings.append(float(rating_response))
246245
except ValueError:
247246
ratings.append(0)
248247

249-
rating_messages = rating_messages[:-2]
248+
rating_messages = rating_messages[:-2] # remove the last two messages
250249

251250
best_index = ratings.index(max(ratings))
252251
cb_log["ratings"] = ratings

0 commit comments

Comments
 (0)