kedro-org / kedro-viz

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

Kedro Viz Lite User Warnings #2058

Open ravi-kumar-pilla opened 3 weeks ago

ravi-kumar-pilla commented 3 weeks ago

Description

This ticket is to address next steps in https://github.com/kedro-org/kedro-viz/pull/1966

  1. FE notice with a warning of missing imports suggestion from TD on Lightweight Kedro Viz implementation
  2. CLI showing a warning message with missing imports (already implemented but needs confirmation from design on the wording. @stephkaiser )
  3. MemoryDataset to custom ImportErrorDataset in-case of missing dataset dependencies in the metadata panel. Since the focus is mostly on flowchart, I am not sure if we should create a custom dataset or leave this as MemoryDataset. (need to discuss this during backlog grooming)

Context

We mocked missing dependencies in Kedro project when users run kedro viz --lite. This ticket aims at letting the users aware of the mocked dependencies both in UI and CLI

Possible Implementation

  1. In CLI, have a logger warning message to inform users of the missing dependencies. Example:
[08/23/24 16:33:59] WARNING  Kedro-Viz has mocked the following             data_loader.py:173
                             dependencies for lite-mode.                                      
                             ['sklearn.base', 'matplotlib.pyplot',                            
                             'matplotlib', 'seaborn', 'PIL',                                  
                             'sklearn.model_selection', 'sklearn',                            
                             'sklearn.metrics']                                               
                             In order to get a complete experience of Viz,                    
                             please install the missing Kedro project                         
                             dependencies 
  1. In UI, have a hidden banner or something similar to this website and Kedro theme

  2. Leave the MemoryDataset as-is or implement a custom dataset and discuss on what all functionalities to include in the dataset (mostly leaving the bare-minimum) to show up in metadata panel

Checklist

ravi-kumar-pilla commented 1 week ago

Hi @rashidakanchwala and @stephkaiser ,

Based on our discussion last week about the CLI message for missing dependencies in --lite mode -

Current message displays as -

[08/23/24 16:33:59] WARNING  Kedro-Viz has mocked the following             data_loader.py:173
                             dependencies for lite-mode.                                      
                             ['sklearn.base', 'matplotlib.pyplot',                            
                             'matplotlib', 'seaborn', 'PIL',                                  
                             'sklearn.model_selection', 'sklearn',                            
                             'sklearn.metrics']                                               
                             In order to get a complete experience of Viz,                    
                             please install the missing Kedro project                         
                             dependencies 

Should the updated message be -

[08/23/24 16:33:59] WARNING  In order to get a complete experience of Kedro-Viz,             data_loader.py:173             
                             please install the missing Kedro project dependencies below:                             
                             ['sklearn.base', 'matplotlib.pyplot',                            
                             'matplotlib', 'seaborn', 'PIL',                                  
                             'sklearn.model_selection', 'sklearn',                            
                             'sklearn.metrics']                  

Thank you

stephkaiser commented 1 week ago

I'd suggest:

[08/23/24 16:33:59] WARNING Kedro-Viz is running with limited functionality. For the best experience with full functionality, please install the missing Kedro project dependencies: ['sklearn.base', 'matplotlib.pyplot', 'matplotlib', 'seaborn', 'PIL', 'sklearn.model_selection', 'sklearn', 'sklearn.metrics']

let me know what you think @rashidakanchwala

stephkaiser commented 1 week ago

Designs for the warning banners can be found here - https://www.figma.com/design/3kSpvIO1veLKfy9qHxuXwF/Kedro-WIP?node-id=2550-103078

Let me know what you think about the information provided. The 'Learn more' button can link to documentation with more information about missing dependencies.

rashidakanchwala commented 4 days ago

The design looks great to me. thanks @stephkaiser