password_model batch mode classify only new discoveries
@@ -47,6 +47,8 @@ class PasswordModel(BaseModel):
new_discoveries = [d for d in discoveries if d['state'] == 'new']
no_new_discoveries = [d for d in discoveries if d['state'] != 'new']
# Create a dataset with all the preprocessed (new) snippets
+ # process new_discoveries if not empty
+ if new_discoveries:
data = self._pre_process([d['snippet'] for d in new_discoveries])
# data = self._preprocess_batch_data(snippets)
# Compute a prediction for each snippet
