Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
nerdai committed Sep 22, 2024
1 parent 04a4c29 commit 55d7a33
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions arc_finetuning_st/workflows/arc_task_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
REFLECTION_PROMPT_TEMPLATE,
)

example_template = """===
EXAMPLE_TEMPLATE = """===
EXAMPLE
INPUT:
Expand All @@ -32,7 +32,7 @@
{output}
"""

past_attempt_template = """◦◦◦
PAST_ATTEMPT_TEMPLATE = """◦◦◦
PAST ATTEMPT {past_attempt_number}
PREDICTED_OUTPUT:
Expand All @@ -55,7 +55,7 @@ def __init__(self, llm: LLM, max_attempts: int = 3, **kwargs: Any) -> None:
self._max_attempts = max_attempts

def _format_past_attempt(self, attempt: Attempt, attempt_num: int) -> str:
return past_attempt_template.format(
return PAST_ATTEMPT_TEMPLATE.format(
past_attempt_number=attempt_num,
past_predicted_output=str(attempt.prediction),
past_critique=str(attempt.critique) if attempt.critique else "",
Expand All @@ -75,7 +75,7 @@ def pretty_print_grid(grid: List[List[int]]) -> str:
return "\n".join(formatted_rows)

def format_train_example(train_pair: Dict) -> str:
return example_template.format(
return EXAMPLE_TEMPLATE.format(
input=pretty_print_grid(train_pair["input"]),
output=pretty_print_grid(train_pair["output"]),
)
Expand Down

0 comments on commit 55d7a33

Please sign in to comment.