Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def forget(self, label_name):
"""
Forget training for label 'label_name'
"""
self._bayes.pop(label_name)
baye_dir = self._get_baye_dir(label_name)
logger.info("Deleting label training {} : {}".format(
label_name, baye_dir
))
rm_rf(baye_dir)
def destroy_index(self):
"""
Destroy the index. Don't use this Index object anymore after this
call. Index will have to be rebuilt from scratch
"""
self.close()
logger.info("Destroying the index ...")
rm_rf(self.indexdir)
rm_rf(self.label_guesser_dir)
logger.info("Done")
def destroy_index(self):
"""
Destroy the index. Don't use this Index object anymore after this
call. Index will have to be rebuilt from scratch
"""
self.close()
logger.info("Destroying the index ...")
rm_rf(self.indexdir)
rm_rf(self.label_guesser_dir)
logger.info("Done")