Skip to content

Commit c6dd5ac

Browse files
total_attribution got changed back to sentence_attribution somewhere along the line so I changed it again. Also added model explanation to PIZZA example notebook.
1 parent 62fb876 commit c6dd5ac

File tree

3 files changed

+679
-658
lines changed

3 files changed

+679
-658
lines changed

attribution/api_attribution.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ async def hierarchical_perturbation(
218218

219219
# Define threshold based on the chosen strategy
220220
if strategy == threshold_attribution_strategy:
221-
chunk_scores.append(attribution_scores["sentence_attribution"])
222-
unit_attribution[i, mask] = norm_attribution_scores["sentence_attribution"]
221+
chunk_scores.append(attribution_scores["total_attribution"])
222+
unit_attribution[i, mask] = norm_attribution_scores["total_attribution"]
223223

224224
# Filling units that were not perturbed with zeros to avoid full nan columns
225225
unperturbed_units = np.isnan(unit_attribution).all(axis=0)

0 commit comments

Comments
 (0)