facebook's implementation
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user