Skip to content

Commit

Permalink
fix typing error
Browse files Browse the repository at this point in the history
  • Loading branch information
callummcdougall committed Sep 26, 2024
1 parent e618d44 commit ad0dea0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions transformer_lens/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -820,8 +820,10 @@ def test_prompt(

# If n_answers = 1 then unwrap answer ranks, so printed output matches original version of function
if not using_multiple_answers:
answer_ranks = [r[0] for r in answer_ranks]
rprint(f"[b]Ranks of the answer tokens:[/b] {answer_ranks}")
single_answer_ranks = [r[0] for r in answer_ranks]
rprint(f"[b]Ranks of the answer tokens:[/b] {single_answer_ranks}")
else:
rprint(f"[b]Ranks of the answer tokens:[/b] {answer_ranks}")


def transpose(tensor: Float[torch.Tensor, "... a b"]) -> Float[torch.Tensor, "... b a"]:
Expand Down

0 comments on commit ad0dea0

Please sign in to comment.