On line 628 of finbert.py you use result = pd.concat([result,batch_result]) when it should be result = pd.concat([result,batch_result], ignore_index=True).
In your result DataFrame the when you concatenate multiple batches together you will have id's that are the same. e.g. 2 batches of 3 items the indexes in result will be 0,1,2,0,1,2.
If you were to convert the DataFrame to a dictionary the results override each other as multiples keys of the same value exist.
On line 628 of finbert.py you use
result = pd.concat([result,batch_result])
when it should beresult = pd.concat([result,batch_result], ignore_index=True)
.In your
result
DataFrame the when you concatenate multiple batches together you will have id's that are the same. e.g. 2 batches of 3 items the indexes in result will be 0,1,2,0,1,2.If you were to convert the DataFrame to a dictionary the results override each other as multiples keys of the same value exist.