Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
gsarti committed Aug 8, 2024
1 parent 539f0cc commit febf463
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions inseq/data/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def show_granular_attributions(
if return_html and return_figure:
raise ValueError("Only one of `return_html` and `return_figure` can be set to True.")
items_to_render = []
for ex_id, attribution in enumerate(attributions):
for attribution in attributions:
if attribution.source_attributions is not None:
items_to_render += [
fg.bolded("Source Saliency Heatmap"),
Expand Down Expand Up @@ -331,9 +331,7 @@ def show_token_attributions(
attributed_token_parts.append(rp.text("\n\n"))
if step_scores is not None:
gen_tok_label = fg.treescope_part_from_display_object(
fg.text_on_color(
curr_gen_tok, value=round(step_scores[gen_idx].item(), 4), vmax=scores_vmax
)
fg.text_on_color(curr_gen_tok, value=round(step_scores[gen_idx].item(), 4), vmax=scores_vmax)
)
else:
gen_tok_label = rp.text(curr_gen_tok)
Expand Down

0 comments on commit febf463

Please sign in to comment.