Skip to content

Commit

Permalink
fixes a edge case typing error that made eval_ablations in circuits_b…
Browse files Browse the repository at this point in the history
…enchmark fail.
  • Loading branch information
evanhanders committed Aug 5, 2024
1 parent 2aeeb3d commit 02101ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion iit/utils/eval_ablations.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def ablate_nodes(
)
changed_result = (~ll_unchanged).cpu().float() * accuracy
if relative_change:
return changed_result.sum().item() / (accuracy.float().sum().item() + 1e-6)
return changed_result.sum() / (accuracy.float().sum() + 1e-6)

return (~ll_unchanged).cpu().float().mean()

Expand Down

0 comments on commit 02101ec

Please sign in to comment.