facebook's implementation

This commit is contained in:
2026-06-14 23:13:33 +02:00
parent 5f09017456
commit 207fcae699
7 changed files with 345 additions and 61 deletions

View File

@@ -9,9 +9,10 @@ import Util
class Strategy:
"""Abstract base class for unlearning algorithms with automated, strategy-specific logging."""
def __init__(self):
def __init__(self, target_class_index):
# Dynamically set file name based on the class name (e.g., 'NormalizingLinearFiltration.txt')
self.strategy_name = self.__class__.__name__
self.target_class_index = target_class_index
self.log_file = Path(f"reports/{self.strategy_name}/metrics.txt")
Util._initialize_log_file(log_file= self.log_file)