Add typo checker in pre-commit (#6179)
Co-authored-by: Brayden Zhong <b8zhong@uwaterloo.ca>
This commit is contained in:
@@ -140,7 +140,7 @@ class ChatCompletionSampler(SamplerBase):
|
||||
max_tokens=self.max_tokens,
|
||||
)
|
||||
return response.choices[0].message.content
|
||||
# NOTE: BadRequestError is triggered once for MMMU, please uncomment if you are reruning MMMU
|
||||
# NOTE: BadRequestError is triggered once for MMMU, please uncomment if you are rerunning MMMU
|
||||
except openai.BadRequestError as e:
|
||||
print("Bad Request Error", e)
|
||||
return ""
|
||||
|
||||
@@ -121,7 +121,7 @@ class HumanEval(Eval):
|
||||
convo=convo,
|
||||
metrics={
|
||||
f"pass@{k}": estimate_pass_at_k([total], [correct], k)
|
||||
# this will be aggrated so no need of .mean()
|
||||
# this will be aggregated so no need of .mean()
|
||||
for k in self._ks_passes
|
||||
if total >= k
|
||||
},
|
||||
|
||||
@@ -370,7 +370,7 @@ def test_dtype_gen():
|
||||
@sgl.function
|
||||
def dtype_gen(s):
|
||||
s += "Q: What is the full name of DNS?\n"
|
||||
s += "A: The full nams is " + sgl.gen("str_res", dtype=str, stop="\n") + "\n"
|
||||
s += "A: The full names is " + sgl.gen("str_res", dtype=str, stop="\n") + "\n"
|
||||
s += "Q: Which year was DNS invented?\n"
|
||||
s += "A: " + sgl.gen("int_res", dtype=int) + "\n"
|
||||
s += "Q: What is the value of pi?\n"
|
||||
|
||||
Reference in New Issue
Block a user