mirror of
https://github.com/NousResearch/atropos.git
synced 2026-05-01 17:45:16 +00:00
make linter happy
This commit is contained in:
parent
a2e14cf50c
commit
aa66b09c13
1 changed files with 5 additions and 6 deletions
|
|
@ -1,5 +1,4 @@
|
||||||
import asyncio
|
import asyncio
|
||||||
import json
|
|
||||||
import math
|
import math
|
||||||
import random
|
import random
|
||||||
import re
|
import re
|
||||||
|
|
@ -502,7 +501,7 @@ class PairwiseJudgementEnv(BaseEnv):
|
||||||
)
|
)
|
||||||
|
|
||||||
# Show configuration info
|
# Show configuration info
|
||||||
print(f"\nPairwise Judgement Configuration:")
|
print("\nPairwise Judgement Configuration:")
|
||||||
print(
|
print(
|
||||||
f" - Training dataset: {self.config.train_dataset} (split: {self.config.train_split})"
|
f" - Training dataset: {self.config.train_dataset} (split: {self.config.train_split})"
|
||||||
)
|
)
|
||||||
|
|
@ -517,7 +516,7 @@ class PairwiseJudgementEnv(BaseEnv):
|
||||||
if len(self.train) > 0:
|
if len(self.train) > 0:
|
||||||
try:
|
try:
|
||||||
sample_train_item = self.train[0]
|
sample_train_item = self.train[0]
|
||||||
print(f"\nSample training item structure:")
|
print("\nSample training item structure:")
|
||||||
print(f"- Available keys: {list(sample_train_item.keys())}")
|
print(f"- Available keys: {list(sample_train_item.keys())}")
|
||||||
|
|
||||||
if "uid" in sample_train_item:
|
if "uid" in sample_train_item:
|
||||||
|
|
@ -536,7 +535,7 @@ class PairwiseJudgementEnv(BaseEnv):
|
||||||
if len(self.test) > 0:
|
if len(self.test) > 0:
|
||||||
try:
|
try:
|
||||||
sample_eval_item = self.test[0]
|
sample_eval_item = self.test[0]
|
||||||
print(f"\nSample evaluation item structure:")
|
print("\nSample evaluation item structure:")
|
||||||
print(f"- Available keys: {list(sample_eval_item.keys())}")
|
print(f"- Available keys: {list(sample_eval_item.keys())}")
|
||||||
|
|
||||||
# Handle different dataset structures
|
# Handle different dataset structures
|
||||||
|
|
@ -839,7 +838,7 @@ class PairwiseJudgementEnv(BaseEnv):
|
||||||
else:
|
else:
|
||||||
# Fallback if generation fails
|
# Fallback if generation fails
|
||||||
answers = [
|
answers = [
|
||||||
"This is a comprehensive and well-structured response that addresses the question thoroughly with detailed examples and clear explanations.",
|
"This is a comprehensive and well-structured response that addresses the question thoroughly with detailed examples and clear explanations.", # noqa
|
||||||
"Brief response.",
|
"Brief response.",
|
||||||
]
|
]
|
||||||
# Pad to required number of choices
|
# Pad to required number of choices
|
||||||
|
|
@ -851,7 +850,7 @@ class PairwiseJudgementEnv(BaseEnv):
|
||||||
answers = answers[: self.config.num_choices]
|
answers = answers[: self.config.num_choices]
|
||||||
random.shuffle(answers)
|
random.shuffle(answers)
|
||||||
correct_index = answers.index(
|
correct_index = answers.index(
|
||||||
"This is a comprehensive and well-structured response that addresses the question thoroughly with detailed examples and clear explanations."
|
"This is a comprehensive and well-structured response that addresses the question thoroughly with detailed examples and clear explanations." # noqa
|
||||||
)
|
)
|
||||||
correct_answer = self.choice_letters[correct_index]
|
correct_answer = self.choice_letters[correct_index]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue