You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When computing attributions for a list of sentences the tqdm iterator prints out the iteration per token, which gives no insight into how far in you are with the corpus of sentences that you are attributing over. I would suggest that when attributing over a List of strings the tqdm iterates per sentence, and drops the per token iteration.
Commit to Help
Happy to have a go at this if you agree this could be nice.
I'm willing to help with this feature.
The text was updated successfully, but these errors were encountered:
Hey @jumelet, nice idea, and of course any help would be more than welcome! 😄
Some details and comments that might help in this sense:
The loop happens in the attribute method call, and supports both tqdm (in notebooks) and rich (in console, if pretty_progress=True) logging if show_progress=True.
attribute receives only a batch of inputs to attribute, since the full set of inputs is actually split in batches and passed gradually by the batched decorator around prepare_and_attribute
A simple way to achieve the desired behavior is to use tqdm for the outer loop inside batched, and set show_progress=False to avoid showing the per-example one. Consider however that for the console case, keeping the per-example rich progress might still be desirable.
Description
When computing attributions for a list of sentences the tqdm iterator prints out the iteration per token, which gives no insight into how far in you are with the corpus of sentences that you are attributing over. I would suggest that when attributing over a List of strings the tqdm iterates per sentence, and drops the per token iteration.
Commit to Help
Happy to have a go at this if you agree this could be nice.
The text was updated successfully, but these errors were encountered: