kedro-org / kedro-viz

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

Improve Console Output to Indicate Hook Usage in Kedro-Viz #2145

Open SajidAlamQB opened 1 month ago

SajidAlamQB commented 1 month ago

Description

This is a follow-up issue to: https://github.com/kedro-org/kedro-viz/issues/2142

When debugging hook-related issues in Kedro-Viz because the console output does not make it clear whether hooks are being used or not. Users may not know to try the --include-hooks option, leading to confusion when functionality is missing.

Context

This change is important because it will improve clarity when running Kedro-Viz. Some users use custom hooks and are unaware that hooks are not being loaded, making it difficult to diagnose problems. Adding a simple message in the console output would save users time when this problem arises.

Example implementation:

INFO: Running kedro-viz without hooks, if you spot missing functionality try 'kedro viz run --include-hooks'

or

INFO: Running kedro-viz with hooks: mlflow, custom

Possible Alternatives

Could we make --include-hooks by default?

Checklist

rashidakanchwala commented 1 month ago

We purposely made --include--hooks not there by default because ideally kedro-viz doesn't need to run hooks unless you are using dynamic pipeline. Something that I heard is not encouraged. can you confirm @astrojuanlu ? Also include--hook made Kedro-viz slower if you had pyspark setup, or mlflow.

This is great idea! I also wanted to ask if there's anyway to detect a user is using dynamic pipelines or requires to run hooks to access variables, and if kedro-viz fails; we could say that's because hooks didn't run ? I guess that sort of error handling would be in framework ?

astrojuanlu commented 1 month ago

Let's tackle the question of enabling --include-hooks separately, it was indeed introduced to improve the default experience https://github.com/kedro-org/kedro-viz/issues/1808

I also wanted to ask if there's anyway to detect a user is using dynamic pipelines or requires to run hooks to access variables

I have no idea 🤔