Skip to content

Commit

Permalink
removed overly verbose logging
Browse files Browse the repository at this point in the history
  • Loading branch information
simplymathematics committed Jul 31, 2024
1 parent 2796641 commit 59b777f
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 21 deletions.
5 changes: 0 additions & 5 deletions deckard/base/attack/attack.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ def __init__(
self.attack_size = attack_size
self.init = AttackInitializer(model, name, **init)
self.kwargs = kwargs
logger.info("Instantiating Attack with id: {}".format(self.__hash__()))

def __hash__(self):
return int(my_hash(self), 16)
Expand Down Expand Up @@ -300,7 +299,6 @@ def __init__(
self.attack_size = attack_size
self.init = AttackInitializer(model, name, **init)
self.kwargs = kwargs
logger.info("Instantiating Attack with id: {}".format(self.__hash__()))

def __hash__(self):
return int(my_hash(self), 16)
Expand Down Expand Up @@ -493,7 +491,6 @@ def __init__(
self.attack_size = attack_size
self.init = AttackInitializer(model, name, **init)
self.kwargs = kwargs
logger.info("Instantiating Attack with id: {}".format(self.__hash__()))

def __hash__(self):
return int(my_hash(self), 16)
Expand Down Expand Up @@ -618,7 +615,6 @@ def __init__(
f"kwargs must be of type DictConfig or dict. Got {type(kwargs)}",
)
self.kwargs = kwargs
logger.info("Instantiating Attack with id: {}".format(self.__hash__()))

def __hash__(self):
return int(my_hash(self), 16)
Expand Down Expand Up @@ -813,7 +809,6 @@ def __init__(
kwargs.update(**kwargs.pop("kwargs"))
self.kwargs = kwargs
self.name = name if name is not None else my_hash(self)
logger.info("Instantiating Attack with id: {}".format(self.name))

def __call__(
self,
Expand Down
1 change: 0 additions & 1 deletion deckard/base/data/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ def save(self, data, filename):
:param filename: str
"""
if filename is not None:
logger.info(f"Saving data to {filename}")
suffix = Path(filename).suffix
Path(filename).parent.mkdir(parents=True, exist_ok=True)
if isinstance(data, dict):
Expand Down
9 changes: 0 additions & 9 deletions deckard/base/data/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ class SklearnDataGenerator:
kwargs: dict = field(default_factory=dict)

def __init__(self, name, **kwargs):
logger.info(
f"Instantiating {self.__class__.__name__} with name={name} and kwargs={kwargs}",
)
self.name = name
self.kwargs = {k: v for k, v in kwargs.items() if v is not None}

Expand Down Expand Up @@ -91,9 +88,6 @@ class TorchDataGenerator:
kwargs: dict = field(default_factory=dict)

def __init__(self, name, path=None, **kwargs):
logger.info(
f"Instantiating {self.__class__.__name__} with name={name} and kwargs={kwargs}",
)
self.name = name
self.path = path
self.kwargs = {k: v for k, v in kwargs.items() if v is not None}
Expand Down Expand Up @@ -179,9 +173,6 @@ class KerasDataGenerator:
kwargs: dict = field(default_factory=dict)

def __init__(self, name, **kwargs):
logger.info(
f"Instantiating {self.__class__.__name__} with name={name} and kwargs={kwargs}",
)
self.name = name
self.kwargs = {k: v for k, v in kwargs.items() if v is not None}

Expand Down
2 changes: 0 additions & 2 deletions deckard/base/model/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ def __init__(self, **kwargs):
self.kwargs = kwargs

def __call__(self, data: list, model: object, library=None):
logger.info(f"Training model {model} with fit params: {self.kwargs}")
device = str(model.device) if hasattr(model, "device") else "cpu"
trainer = self.kwargs
if library in sklearn_dict.keys():
Expand All @@ -91,7 +90,6 @@ def __call__(self, data: list, model: object, library=None):
try:
start = process_time_ns()
start_timestamp = time()
logger.info(f"Fitting type(model): {type(model)} with kwargs {trainer}")
model.fit(data[0], data[2], **trainer)
end = process_time_ns()
end_timestamp = time()
Expand Down
4 changes: 0 additions & 4 deletions deckard/base/model/sklearn_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ class SklearnModelPipelineStage:
kwargs: dict = field(default_factory=dict)

def __init__(self, name, stage_name, **kwargs):
logger.debug(
f"Instantiating {self.__class__.__name__} with name={name} and kwargs={kwargs}",
)
self.name = name
self.kwargs = kwargs
self.stage_name = stage_name
Expand Down Expand Up @@ -102,7 +99,6 @@ class SklearnModelPipeline:
pipeline: Dict[str, SklearnModelPipelineStage] = field(default_factory=dict)

def __init__(self, **kwargs):
logger.debug(f"Instantiating {self.__class__.__name__} with kwargs={kwargs}")
pipe = {}
while "kwargs" in kwargs:
pipe.update(**kwargs.pop("kwargs"))
Expand Down

0 comments on commit 59b777f

Please sign in to comment.