macanv / BERT-BiLSTM-CRF-NER

Tensorflow solution of NER task Using BiLSTM-CRF model with Google BERT Fine-tuning And private Server services
https://github.com/macanv/BERT-BiLSMT-CRF-NER
4.67k stars 1.25k forks source link

add try/finally to ConcurrentBertClient avoid not release BertClient … #373

Open iamgd67 opened 3 years ago

iamgd67 commented 3 years ago

add try/finally to ConcurrentBertClient avoid not release BertClient on exception in my case, if pass contents contains space will cause BertClient not released and end up with error message

Too many concurrent connections!Try to increase the value of "max_concurrency"