Skip to content

mixtral evaluation PR#8989

Merged
ericharper merged 4 commits intoNVIDIA-NeMo:mainfrom
Slyne:mixtral-as-judge-eval-pipeline2
May 6, 2024
Merged

mixtral evaluation PR#8989
ericharper merged 4 commits intoNVIDIA-NeMo:mainfrom
Slyne:mixtral-as-judge-eval-pipeline2

Conversation

@Slyne
Copy link
Contributor

@Slyne Slyne commented Apr 19, 2024

Please refer to the previous PR:
#8988

Co-authored-by: PannuMuthu <pmuthukumar@nvidia.com>

Signed-off-by: Slyne Deng <slyned@nvidia.com>
@Slyne
Copy link
Contributor Author

Slyne commented Apr 19, 2024

@ethanhe42
too messy to fix the signature issue for the previous pr: #8988
So restart a new one. LOL..

Signed-off-by: Slyne Deng <slyned@nvidia.com>
@ethanhe42
Copy link
Contributor

@Slyne could you move doc to docs/source/multimodal/mllm/video_neva.rst ?

Slyne Deng added 2 commits May 3, 2024 12:06
Signed-off-by: Slyne Deng <slyned@nvidia.com>
@Slyne
Copy link
Contributor Author

Slyne commented May 3, 2024

@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'

Except block directly handles BaseException.

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

File is opened but is not closed.
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

File is opened but is not closed.
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

File is opened but is not closed.
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

File is opened but is not closed.
else:
cur_reviews = []

review_file = open(f'{args.output}', 'a')

Check warning

Code scanning / CodeQL

File is not always closed

File may not be closed if an exception is raised.

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

File is opened but is not closed.


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

File is opened but is not closed.

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

File is opened but is not closed.
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

File may not be closed if an exception is raised.
@ericharper ericharper merged commit f609553 into NVIDIA-NeMo:main May 6, 2024
rohitrango pushed a commit to rohitrango/NeMo that referenced this pull request Jun 25, 2024
* add mixtral evaluation
Co-authored-by: PannuMuthu <pmuthukumar@nvidia.com>

Signed-off-by: Slyne Deng <slyned@nvidia.com>

* fix format & remove unused import

Signed-off-by: Slyne Deng <slyned@nvidia.com>

* move mixtral as judge evaluation document

Signed-off-by: Slyne Deng <slyned@nvidia.com>

---------

Signed-off-by: Slyne Deng <slyned@nvidia.com>
Co-authored-by: Slyne Deng <slyned@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants