Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[KED-1650] New graphing algorithm & feature flags #185

Merged
merged 43 commits into from
Jun 23, 2020
Merged

Conversation

bru5
Copy link
Contributor

@bru5 bru5 commented Jun 4, 2020

Description

Improves pipeline visualisation using a new DAG graphing algorithm approach.

comparison

The algorithm is focused on improving the quality and clarity of output for both node layout and edge routing while maintaining good performance.

Goals include balancing the regularity, legibility, symmetry, spacing and compactness of layout and edges while scaling to graphs with a large number of nodes and edges, for which the existing solution does not handle well enough for this purpose.

These changes are delivered alongside a minimal feature flag system to support toggling of experimental new features such as this one until their general release.

The feature flag must be enabled in your browser before use and testing (see below).

Development notes

As there is currently no GUI for flags, they must be enabled and disabled using parameters in the URL. The status of all flags will persist in the user's local storage config and the console shows a message regarding the status of all flags on load.

Screenshot 2020-06-04 at 12 18 30

The flag for the new graphing algorithm is newgraph, it is disabled by default, you can use the URL parameters newgraph=true or newgraph=false.

e.g.http://localhost:4141/?data=demo&newgraph=true.

The implementation itself is self contained and includes a selector that connects it to the rest of the system in the same way as the existing solution, such that it works as a drop-in replacement.

It currently depends on the kiwi.js solver, though there is potential that this may not eventually be required given some upgrades to the main solver.

QA notes

The feature must be enabled by the user before testing, as described above. Try the following test data sets. Side-by-side comparison is possible by enabling or disabling the flag:

Demo
http://localhost:4141/?data=demo&newgraph=true
http://localhost:4141/?data=demo&newgraph=false

Random (includes layers)
http://localhost:4141/?data=random&newgraph=true
http://localhost:4141/?data=random&newgraph=false

(see console to get a reusable seed for direct comparison)

Animals
http://localhost:4141/?data=animals&newgraph=true
http://localhost:4141/?data=animals&newgraph=false

Nodes.json (as generated by Kedro)
http://localhost:4141/?newgraph=true
http://localhost:4141/?newgraph=false

It has been tested on both real samples as well as varied pipelines generated by the existing random generator, both ranging so far from around 10 nodes to around 1000, all showing some strong improvement, both when labels are visible and when not.

It has support for and has been tested with pipelines that include layers.

There are also unit tests covering the majority of the changes, though they are not sufficient to test the actual quality of graphing output which must be done manually. For this I have been considering some metrics for more objective evaluation but more exploration is needed.

While the algorithm appears to work well on most pipelines seen so far, wider beta testing is encouraged before the flag is removed for general release.

Checklist

  • Read the contributing guidelines
  • Opened this PR as a 'Draft Pull Request' if it is work-in-progress
  • Updated the documentation to reflect the code changes
  • Added new entries to the RELEASE.md file
  • Added tests to cover my changes

Legal notice

  • I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":

  • I submit this contribution under the Apache 2.0 license and represent that I am entitled to do so on behalf of myself, my employer, or relevant third parties, as applicable.

  • I certify that (a) this contribution is my original creation and / or (b) to the extent it is not my original creation, I am authorised to submit this contribution on behalf of the original creator(s) or their licensees.

  • I certify that the use of this contribution as authorised by the Apache 2.0 license does not violate the intellectual property rights of anyone else.

richardwestenra and others added 27 commits April 30, 2020 13:41
There's no onClick event, so the button element is unnecessary
This to distinguish clicked (i.e. selected) from active (i.e. hovered/focused)
Check that it sets nodeClicked to null if the selected node is being disabled
Copy link
Contributor

@richardwestenra richardwestenra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀🚀🚀🚀🚀

README.md Outdated

### Viewing flags

See the message in your browser's console for info regarding the available flags and their values as currently set on your machine.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I follow this. What message? What console?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've reworded with some extra information including a link to a Mozilla article explaining the developer console, does that help?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does. So much better 🚀

Copy link
Contributor

@stichbury stichbury left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Just one major issue, for me, which was that statement about browser console listings was a bit too vague. I'm no expert in this area, but if you can be more explicit in how you find the information, it would probably help every user at some level, by reducing ambiguity.

Copy link
Contributor

@yetudada yetudada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy on the legal end.

@921kiyo
Copy link
Contributor

921kiyo commented Jun 22, 2020

Legal headers LGTM :)

Copy link
Contributor

@yetudada yetudada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved 👍

@stichbury
Copy link
Contributor

Looks good to me -- the changes in ReadMe are spot on.

@bru5 bru5 merged commit 5ed4903 into develop Jun 23, 2020
@bru5 bru5 deleted the feature/graph-concept branch June 23, 2020 14:31
@richardwestenra richardwestenra mentioned this pull request Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants