Replies: 3 comments 3 replies
-
|
Hi @ahkole , this is not possible with the current type annotation system. In What's the use case for this? Do you really want to pass an arbitrarily nested dict as input? In this case, WorkGraph will not know how to serialize the input, so every item in the dict will be stored as an AiiDA node. |
Beta Was this translation helpful? Give feedback.
-
In this case, you can use select to exclude the ports that are provided from elsewhere. Here is another example, where the I will also make a PR soon to support an arbitrarily nested dynamic namespace. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @ahkole , aiida-workgraph 0.7.3 is released to support arbitrarily nested dynamic namespace. If no item type is specified (i.e., just |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am exploring the new type annotation system/API for declaring the inputs/outputs of tasks (https://aiida-workgraph.readthedocs.io/en/latest/howto/autogen/annotate_inputs_outputs.html#). I was wondering if it's possible to declare a dynamic namespace that can contain an arbitrary number of nested (dynamic) namespaces. There is an example of having a dynamic namespace that contains an arbitrary number of static namespaces here (https://aiida-workgraph.readthedocs.io/en/latest/howto/autogen/annotate_inputs_outputs.html#nested-namespaces) but it's not clear to me if it's possible to have an arbirary nested dynamic namespace. For example, say that you have this task,
And then you would be able to call it with an arbitrarily nested dict so that it contains some arbitrarily nested namespace:
So that it creates the following input ports:
Is this possible with the current type annotation system?
Beta Was this translation helpful? Give feedback.
All reactions