Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
sedrick-keh-tri committed Jan 23, 2025
1 parent 97b4b35 commit d19763a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eval/chat_benchmarks/MBPPPlus/eval_instruct.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ def __init__(
self.num_examples = 3
self.start_idx = 0
self.end_idx = 500

def format_test_example(self, question: str, tests: List[str], code: Optional[str] = None) -> str:
"""Format a single test example."""
prompt = ">>> Problem:\n{}\n>>> Test Cases:\n{}\n".format(question.strip(), "\n".join(tests))
if code:
code = code.replace("\r", "").replace("\t", " ")
prompt += "\n>>> Code:\n```python\n{}\n```".format(code)
return prompt

def read_test_examples(self, data_path: str) -> Generator[Dict[str, str], None, None]:
"""
Read and format test examples from data file.
Expand Down

0 comments on commit d19763a

Please sign in to comment.