When plotting the shap text it is showing an extra letter(Ġ) before every word. #3660
Open
3 of 4 tasks
Labels
awaiting feedback
Indicates that further information is required from the issue creator
bug
Indicates an unexpected problem or unintended behaviour
visualization
Relating to plotting
Issue Description
From May 14th, it is showing an extra letter(Ġ) before every word in a sentence when using shap.plots.text(shap_values)
Code snippet:
pred = transformers.pipeline(
"text-classification",
model=model,
tokenizer=tokenizer,
device=0,
return_all_scores=True,
)
explainer = shap.Explainer(pred)
shap_values = explainer(df["text"][33:43])
shap.plots.text(shap_values)
For example main text:
I think this broke OAuth2, diaspora-client seems to dislike oauth2 0.5"
Showd text:
I Ġthink Ġthis Ġbroke ĠO Auth 2 , Ġdi as pora - client Ġseems Ġto Ġdislike Ġo auth 2 Ġ0 . 5 "
Minimal Reproducible Example
Traceback
No response
Expected Behavior
Shouldn't show extra letter (Ġ)
![Screenshot 2024-05-15 at 1 21 15 PM](https://private-user-images.githubusercontent.com/87907096/330917497-f1c018e1-8a13-4130-b784-2183e514ce37.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg4Mjc5ODAsIm5iZiI6MTcxODgyNzY4MCwicGF0aCI6Ii84NzkwNzA5Ni8zMzA5MTc0OTctZjFjMDE4ZTEtOGExMy00MTMwLWI3ODQtMjE4M2U1MTRjZTM3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjE5VDIwMDgwMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTgyOGMxN2FkMzkzMmNiNTc4MjliMmIwYTE5YmY3NzYyNDQ2YTZmNGMyMDQ4NWQ1OTk0YTgxOTAzYTVmNWIxMzYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.URSaAHLY2yvD71RQmOPTNfMMmQ6YcxQoXRUUKpbftI0)
Shouldn't
Bug report checklist
Installed Versions
0.45.2.dev2
The text was updated successfully, but these errors were encountered: