Skip to content
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

Merged
merged 4 commits into from
May 6, 2024
Merged

mixtral evaluation PR #8989

merged 4 commits into from
May 6, 2024

Conversation

Slyne
Copy link
Contributor

@Slyne Slyne commented Apr 19, 2024

Please refer to the previous PR:
#8988

Co-authored-by: PannuMuthu <[email protected]>

Signed-off-by: Slyne Deng <[email protected]>
@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..

@ethanhe42
Copy link
Member

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

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

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 Warning

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 Warning

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 Warning

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 Warning

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 Warning

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 Warning

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 Warning

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 Warning

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 Warning

File may not be closed if an exception is raised.
@ericharper ericharper merged commit f609553 into NVIDIA:main May 6, 2024
130 of 131 checks passed
rohitrango pushed a commit to rohitrango/NeMo that referenced this pull request Jun 25, 2024
* 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]>
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