🐛 fix(loading.py): fix condition to remove empty input_key and output_key parameters

The condition to remove empty input_key and output_key parameters has been fixed to correctly handle cases where the parameters are empty strings. This ensures that the parameters are only removed if they are either empty strings or not present in the params dictionary.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-07-07 15:38:36 -03:00
commit da0cf30057

View file

@ -115,7 +115,7 @@ def instantiate_memory(node_type, class_object, params):
# process input_key and output_key to remove them if
# they are empty strings
for key in ["input_key", "output_key"]:
if key in params and not params[key]:
if key in params and (params[key] == "" or not params[key]):
params.pop(key)
try: