-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mixtral evaluation PR #8989
mixtral evaluation PR #8989
Conversation
Co-authored-by: PannuMuthu <[email protected]> Signed-off-by: Slyne Deng <[email protected]>
@ethanhe42 |
Signed-off-by: Slyne Deng <[email protected]>
@Slyne could you move doc to |
…-judge-eval-pipeline2
Signed-off-by: Slyne Deng <[email protected]>
@ethanhe42 Done. |
if line: | ||
try: | ||
res = json.loads(line.decode("utf-8").split("data: ")[1]) | ||
except: |
Check notice
Code scanning / CodeQL
Except block handles 'BaseException' Note
|
||
def generate_prompt(args, answer_list): | ||
f_q = open(os.path.expanduser(args.question_file)) | ||
f_ans1 = open(os.path.expanduser(answer_list[0])) |
Check warning
Code scanning / CodeQL
File is not always closed Warning
def generate_prompt(args, answer_list): | ||
f_q = open(os.path.expanduser(args.question_file)) | ||
f_ans1 = open(os.path.expanduser(answer_list[0])) | ||
f_ans2 = open(os.path.expanduser(answer_list[1])) |
Check warning
Code scanning / CodeQL
File is not always closed Warning
f_q = open(os.path.expanduser(args.question_file)) | ||
f_ans1 = open(os.path.expanduser(answer_list[0])) | ||
f_ans2 = open(os.path.expanduser(answer_list[1])) | ||
rule_dict = json.load(open(os.path.expanduser(args.rule_file), 'r')) |
Check warning
Code scanning / CodeQL
File is not always closed Warning
rule_dict = json.load(open(os.path.expanduser(args.rule_file), 'r')) | ||
|
||
if os.path.isfile(os.path.expanduser(args.output)): | ||
cur_reviews = [json.loads(line) for line in open(os.path.expanduser(args.output))] |
Check warning
Code scanning / CodeQL
File is not always closed Warning
else: | ||
cur_reviews = [] | ||
|
||
review_file = open(f'{args.output}', 'a') |
Check warning
Code scanning / CodeQL
File is not always closed Warning
|
||
review_file = open(f'{args.output}', 'a') | ||
|
||
context_list = [json.loads(line) for line in open(os.path.expanduser(args.context_file))] |
Check warning
Code scanning / CodeQL
File is not always closed Warning
|
||
|
||
def preprocess(args, response_file, model_name): | ||
questions = [json.loads(q) for q in open(os.path.expanduser(args.question_file), "r")] |
Check warning
Code scanning / CodeQL
File is not always closed Warning
|
||
def preprocess(args, response_file, model_name): | ||
questions = [json.loads(q) for q in open(os.path.expanduser(args.question_file), "r")] | ||
responses = [json.loads(r) for r in open(os.path.expanduser(response_file), "r")] |
Check warning
Code scanning / CodeQL
File is not always closed Warning
answer_file = os.path.join(args.answers_dir, f'{base}_answer{ext}') | ||
answers_file = os.path.expanduser(answer_file) | ||
os.makedirs(os.path.dirname(answers_file), exist_ok=True) | ||
ans_file = open(answers_file, "w") |
Check warning
Code scanning / CodeQL
File is not always closed Warning
* add mixtral evaluation Co-authored-by: PannuMuthu <[email protected]> Signed-off-by: Slyne Deng <[email protected]> * fix format & remove unused import Signed-off-by: Slyne Deng <[email protected]> * move mixtral as judge evaluation document Signed-off-by: Slyne Deng <[email protected]> --------- Signed-off-by: Slyne Deng <[email protected]> Co-authored-by: Slyne Deng <[email protected]>
Please refer to the previous PR:
#8988