Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix format
  • Loading branch information
CodingWithTim committed Nov 8, 2023
commit d6dda01b783351a431dcab247d8a03343fa5ecd3
4 changes: 3 additions & 1 deletion fastchat/llm_judge/gen_api_answer.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
def get_answer(
question: dict, model: str, num_choices: int, max_tokens: int, answer_file: str
):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's add an assertion that we can't have both args.force_temperature and required_temperature

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just added an assertion to make sure both can't be true.

assert (args.force_temperature is not None and "required_temperature" in question.keys()) == False
assert (
args.force_temperature is not None and "required_temperature" in question.keys()
) == False
if args.force_temperature is not None:
temperature = args.force_temperature
elif "required_temperature" in question.keys():
Expand Down