question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[KED-1108] Improve auto-generated node names

See original GitHub issue

Description & 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:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
SJDunkelmancommented, Feb 26, 2020

Working on this

0reactions
lorenabalancommented, Oct 5, 2020

We’ve parked this for now to focus on other deliverables on our roadmap.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[KED-1108] Improve auto-generated node names #240 - GitHub
One idea is to change the default behaviour so that instead it returns the underlying function name and a small hash, which is...
Read more >
Node.nodeName - Web APIs | MDN
The read-only nodeName property of Node returns the name of the current node as a string.
Read more >
Add new node to graph - MATLAB addnode - MathWorks
Add node names to the graph, and then add five additional new nodes. The auto-generated names for the new nodes indicate their placement...
Read more >
Creating your first node - Node-RED
Create a directory where you will develop your code. Within that directory, create ... When prompted, give it the name node-red-contrib-example-lower-case .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found