Skip to content

Dag with multiple copies of a funcnode #17

Description

@cavart28

In some cases, the user may want to re-use a given function several times within a single dag. Since the name of the function acts as an id for it, that name needs to be changed when created the corresponding funcnode (using the "name" parameter).

This is not the most natural since the function does not change, so why would we require the user to "rename" it (assuming that their inputs/outputs are bound correctly at least)?

In fact the name parameter was intended to be used as an id rather than its name, and is a bit of a misnomer in that respect. There is another parameter of funcnode, namely "label", which allows to control the printed name of the node when using the digraph method. Thanks to that parameter, there is no loss of functionality overall for a user aware of this subtlety but perhaps a bit of confusion since the abstract functionality of a "name" is actually shared by those two parameters.

The actual behavior of a dag with several funcnodes sharing the same name is not clear either. For now the simplest solution is to warn the user when they attempt to create a dag with "repeated" funcnodes (i.e. funcnodes with the same name). Then later also understanding the actual side effects of having two funcnodes and possibly modifying the behavior of a dag in that case.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions