fix: common params

This commit is contained in:
Marco Perini 2024-06-12 03:06:21 +02:00
parent 85a75c893a
commit 6b4cdf92b8

View File

@ -88,12 +88,11 @@ class BaseNode(ABC):
param (dict): The dictionary to update node_config with.
overwrite (bool): Flag indicating if the values of node_config should be overwritten if their value is not None.
"""
if self.node_config is None:
self.node_config = {}
for key, val in params.items():
if hasattr(self, key) and (key not in self.node_config or overwrite):
self.node_config[key] = val
setattr(self, key, val)
if hasattr(self, key) and not overwrite:
continue
setattr(self, key, val)
def get_input_keys(self, state: dict) -> List[str]:
"""