Prediction API error for dense_vector_sequence input
Created by: rulai-huajunzeng
Got the following error message when calling converter.
Traceback (most recent call last):
File "src/PaddlePredictor.py", line 102, in process_predict
result.success = self._handler.predict(args.tenantId, args.predictorId, args.input)
File "src/paddle_predictor_server.py", line 173, in predict
result = adapter_method(model_obj, parsed_input)
File "src/adapter.py", line 191, in entity_tagging
result = model.predict(modified_input)
File "src/paddle_predictor_server.py", line 106, in predict
result = self.model.predict(data)
File "src/model.py", line 39, in predict
input = self.converter(self.data_provider_module.convert_data(data))
File "/usr/local/lib/python2.7/site-packages/py_paddle/dataprovider_converter.py", line 233, in __call__
return self.convert(dat, argument)
File "/usr/local/lib/python2.7/site-packages/py_paddle/dataprovider_converter.py", line 225, in convert
scanner.scan(each_step)
File "/usr/local/lib/python2.7/site-packages/py_paddle/dataprovider_converter.py", line 184, in scan
self.__inner_scanner__.scan(each)
File "/usr/local/lib/python2.7/site-packages/py_paddle/dataprovider_converter.py", line 109, in scan
self.__mat__[self.__height__] = dat
TypeError: 'NoneType' object does not support item assignment
I checked the source code, and found that DenseScanner has a finish_pre_scan method, which assigns value to self.__mat__. But if it's a dense_vector_sequence, finish_pre_scan is not called by the SequenceScanner, which caused the None error.