textattack.loggers package
Misc Loggers: Loggers track, visualize, and export attack results.
Managing Attack Logs.
- class textattack.loggers.attack_log_manager.AttackLogManager(metrics: Dict | None)[source]
Bases:
object
Logs the results of an attack to all attached loggers.
- metrics: Dict
Attack Logs to CSV
- class textattack.loggers.csv_logger.CSVLogger(filename='results.csv', color_method='file')[source]
Bases:
Logger
Logs attack results to a CSV.
Attack Logs to file
- class textattack.loggers.file_logger.FileLogger(filename='', stdout=False, color_method='ansi')[source]
Bases:
Logger
Logs the results of an attack to a file, or stdout.
Attack Logger Wrapper
- class textattack.loggers.logger.Logger[source]
Bases:
ABC
An abstract class for different methods of logging attack results.
Attack Logs to Visdom
- class textattack.loggers.visdom_logger.VisdomLogger(env='main', port=8097, hostname='localhost')[source]
Bases:
Logger
Logs attack results to Visdom.