[KED-1108] Improve auto-generated node names
See original GitHub issueDescription & context
Users can specify names for their nodes to identify them more easily. When a name is not explicitly specified, Kedro auto-generates a default name. You can see this in the name
property on Node
.
The current auto-generated name for a node looks something like this: func_name(inputs) -> outputs
. (see implementation of __str__
method on the Node
class)
This is a bit too descriptive and quite hard to type in the CLI to run a particular node (kedro run --node <node_name>
). Our visualisation plugin, Kedro-Viz, is also no longer displaying this long name in the UI.
We can change it to something like ‘-’.join(sorted(outputs)). Outputs should be unique, which makes these names unique too.
Actually just one output is enough, as they should all be unique.
If the node produces no outputs, we probably need to fall back to what we had before or similar.
Possible Implementation
One idea is to change the default behaviour so that instead it returns the underlying function name and a small hash, which is based on the inputs and outputs. This would now be perceived as a unique identifier.
Extra: Check that hover state on nodes in Kedro-Viz shows you the correct thing to be put into the command line kedro run --node
.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top GitHub Comments
Working on this
We’ve parked this for now to focus on other deliverables on our roadmap.