Skip to content

How to use inputs_to_dict ? #648

@jan-janssen

Description

@jan-janssen

I tried the following example:

from pyiron_workflow import Workflow, as_function_node
from pyiron_workflow.api import inputs_to_dict

@as_function_node
def return_dict(input_dict):
    return input_dict

wf = Workflow("test")
wf.a = 1
wf.input_dict_generator = inputs_to_dict(input_specification=["a", "b"])
wf.input_dict = wf.input_dict_generator(a=wf.a, b=2)
wf.result = return_dict(input_dict=wf.input_dict)
wf.draw(size=(10,10))

The input dict for result is not linked to the input_dict so I have the feeling I am doing something wrong:
Image

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions