cli.logic.evaluation.adversarial_evaluation package
cli.logic.evaluation.adversarial_evaluation.adversarial_evaluator module
- class cli.logic.evaluation.adversarial_evaluation.adversarial_evaluator.CLIAdversarialEvaluator(config: AdversarialEvaluationCliConfigType, **kwargs)
Bases:
object
Base class for the adversarial evaluation CLI.
- run()
Run the evaluation.
- try:
- logger.info(“Starting adversarial evaluation with the following evaluators: %s”,
self.config.evaluation.evaluators)
model, data_loader, attack, target_models = self._prepare_evaluation_env() self._execute_evaluation(
model, data_loader, attack, target_models)
logger.info(“Adversarial evaluation completed successfully.”)
- except Exception as e:
click.secho(“Evaluation failed.”, fg=”red”) logger.error(“Failed to evaluate adversarial examples: %s”, e) raise e