Elmo Linking Rule Latency
Closed this issue · 2 comments
andrew-j-luong commented
Hi,
We are using the native AllenNLP Elmo Linking in the Tagging/Linking Rules, and it seems to stall at this step. Have you seen any historical issues with this step?
I think some clarity on how long the step takes to run? OR how we may speed up the process would be greatly appreciated.
Thank you!
andrew-j-luong commented
Hi,
Follow-up on the question - I have found a way to spell out the time.
By utilizing the tqdm in the rules.py you can add a progress bar to each of the tr.apply() or lr.apply() file
Code:
**from tqdm.auto import tqdm
tqdm.pandas()**
class TaggingRule:
def apply(self, instances):
for instance in **tqdm**(instances):
This way you can show how long an apply for tagging/linking rule can take per instance (sentence token).
Thanks
safranchik commented
Thank you for your suggestion!
Adding the tqdm_auto wrapper looks like the best way to display the progress to users.