kedro-org / kedro-viz

Visualise your Kedro data and machine-learning pipelines and track your experiments.
https://demo.kedro.org
Apache License 2.0
678 stars 112 forks source link

Enhance warning message for circular dependency detection in layers #2125

Open tdhooghe opened 1 month ago

tdhooghe commented 1 month ago

Description

When running Kedro Viz, the following warning rightfully appears when having circular dependencies in the data catalog: WARNING Layers visualisation is disabled as circular dependency detected among layers. This message does not provide sufficient information to diagnose which datasets in the catalog are causing the circular dependency.

Context

Currently, the warning message makes it difficult to identify where the issue exactly. Providing more detailed information about the datasets (or layers) causing the circular dependency would greatly enhance the debugging experience.

Possible Implementation

A very simple fix (which I am very happy to make a PR for), would be to log the CycleError exception and possibly also the layer_dependencies.

Possible Alternatives

A more advanced option would be to even show the exact datasets that are causing the circular dependency, but that might introduce too much complexity (haven't looked at it this deep yet).

Checklist

?

rashidakanchwala commented 1 month ago

This would be very useful. Please do go ahead and submit your PR. thanks