xpdAcq / mission-control

Releases, Installers, Specs, and more!
0 stars 4 forks source link

Visualize Pipeline Live #130

Open CJ-Wright opened 5 years ago

CJ-Wright commented 5 years ago

It would be nice to have a live visualization of the pipeline running live. This would show the status of all the nodes (awaiting, running, failed). This will give users/beamline staff easier diagnostics and an indication if/when to restart the pipeline. This will also give the devs an easier time to see where things went wrong.

Expected Behavior

When pipeline starts up a window pops up with the status of each node in the pipeline (as a graph). Green is awaiting, yellow is running, and red for failed.

Current Behavior

No live pipeline vis, difficult diagnostics.

Possible Solution

  1. Make an empty dictionary
  2. Walk the graph
  3. For each node add an entry to the dict with the key as the hash and the value as awaiting.
  4. Attach a callback to the update method for each node which changes the value of the dict depending on the node's status and update the graph
  5. Use grave to plot the graph and use the dict to color the nodes

Note that this could be extended to plot other value of interest (for instance timings of the graph)

CJ-Wright commented 5 years ago

This is pending a release of grave and some associated modifications to the pipeline startup.

CJ-Wright commented 5 years ago

Grave has been released. Now we need to get the pipeline to look ok ish in grave.

CJ-Wright commented 5 years ago

I think the main problem here is that the pipeline is a bit big. This causes the visualization to look a bit wonky.

We may be able to consolidate the pipeline a little (eg rolling all the masking functionality into one mega function) which will make it easier to visualize.