prompt=question+'\nAnswer this question in detail.'
eliflistinstr(['MMVet'],dataset):
prompt=line['question']
else:
question=line['question']
prompt=question+'\nAnswer the question using a single word or phrase.'
elifdatasetisnotNoneand'MMMU'indataset:
question=line['question']
options={
cand:line[cand]
forcandinstring.ascii_uppercase
ifcandinlineandnotpd.isna(line[cand])
}
forkey,iteminoptions.items():
question+=f'\n{key}. {item}'
prompt={
'multiple-choice':'Answer with carefully thought step by step. Apply the thinking process recursively at both macro and micro levels. Verify consistency of reasoning and look for potential flaws or gaps during thinking. When realize mistakes, explain why the previous thinking was incorrect, fix it and then continue thinking.\n\n',# noqa
'open':'Answer with carefully thought step by step. Apply the thinking process recursively at both macro and micro levels. Verify consistency of reasoning and look for potential flaws or gaps during thinking. When realize mistakes, explain why the previous thinking was incorrect, fix it and then continue thinking.\n\n'# noqa