diff --git a/src/maml/base/_describer.py b/src/maml/base/_describer.py index 6fbd1717..f5f5f6c2 100644 --- a/src/maml/base/_describer.py +++ b/src/maml/base/_describer.py @@ -66,7 +66,7 @@ def __init__(self, **kwargs): for k in kwargs: if k not in allowed_kwargs: raise TypeError(f"{k} not allowed as kwargs") - memory = kwargs.get("memory", None) + memory = kwargs.get("memory") if isinstance(memory, bool): memory = tempfile.mkdtemp() logger.info(f"Created temporary directory {memory}") @@ -80,7 +80,7 @@ def __init__(self, **kwargs): n_jobs = cpu_count() logger.info(f"Using {n_jobs} jobs for computation") self.n_jobs = n_jobs - self.feature_batch = get_feature_batch(kwargs.get("feature_batch", None)) + self.feature_batch = get_feature_batch(kwargs.get("feature_batch")) def fit(self, x: Any, y: Any = None) -> BaseDescriber: """ diff --git a/src/maml/utils/_value_profile.py b/src/maml/utils/_value_profile.py index 2bf11513..36c7d9cc 100644 --- a/src/maml/utils/_value_profile.py +++ b/src/maml/utils/_value_profile.py @@ -81,7 +81,7 @@ def __init__(self, value_start: float, value_end: float = 0.0, max_steps: int = **kwargs: captures anything else. """ self.value_start = value_start - rate = kwargs.get("rate", None) + rate = kwargs.get("rate") if rate is None: self.rate = (value_end - self.value_start) / max_steps else: