Received the following error message wehn doing the inference:
Looks like the MisMatchedTokenizer now takes three positional arguments here, only two are given in the predictor class here.
Traceback (most recent call last):
File "/home/ec2-user/gector/fast-gector/predict.py", line 101, in
main(args)
File "/home/ec2-user/gector/fast-gector/predict.py", line 49, in main
pred_batch, cnt = predictor.handle_batch(batch_text)
File "/home/ec2-user/gector/fast-gector/src/predictor.py", line 76, in handle_batch
batch_input_dict = self.preprocess(ori_batch)
File "/home/ec2-user/gector/fast-gector/src/predictor.py", line 114, in preprocess
input_ids, offsets = self.mismatched_tokenizer.encode(tokens)
File "/home/ec2-user/gector/fast-gector/utils/mismatched_utils.py", line 22, in encode
wordpiece_ids = [self.tokenizer_vocab[wordpiece]
File "/home/ec2-user/gector/fast-gector/utils/mismatched_utils.py", line 22, in
wordpiece_ids = [self.tokenizer_vocab[wordpiece]
TypeError: 'int' object is not subscriptable
Received the following error message wehn doing the inference: Looks like the
MisMatchedTokenizer
now takes three positional arguments here, only two are given in the predictor class here.