I’ve been using ctransalte2 for a little while with batch mode. It has been working really well, but since I change to the latest version of Ctranslate2 I believe the output also changed? Or at least my code stopped working!
In order to consume the results of Ctranslate2 I was converting it into a dataframe:
translation_ob = translator_model.translate_batch(dfChunk['SourceTokenized'].values.tolist(), return_scores=predictScore, normalize_scores=True, return_attention=False) translationDF = pd.DataFrame(translation_ob) df[['TargetTokenized', 'predictScore']] = translationDF.apply(pd.Series)
But I don’t seem to be able to do that anymore, yet I’ve been trying many things… but to no avail… anyone has a hint how to do it? I’m trying to avoid conventional loop!