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

Bug/improvement for kedro viz build #1717

Closed
noklam opened this issue Jan 23, 2024 · 6 comments
Closed

Bug/improvement for kedro viz build #1717

noklam opened this issue Jan 23, 2024 · 6 comments
Assignees

Comments

@noklam
Copy link
Contributor

noklam commented Jan 23, 2024

Description

Short description of the problem here.
Steps to reproduce:

  1. kedro new - select kedro-viz and example pipeline
  2. kedro viz build - get error
                             VersionNotFoundError: Did not find any versions for                                                        
                             MatplotlibWriter(filepath=/Users/Nok_Lam_Chan/dev/kedro-viz-build-ghpage/data/08_reporting                 
                             /dummy_confusion_matrix.png, protocol=file, save_args={}, version=Version(load=None,                       
                             save='2024-01-23T16.05.59.458Z'))                                                                          
ERROR: Failed to build Kedro-Viz : Did not find any versions for MatplotlibWriter(filepath=/Users/Nok_Lam_Chan/dev/kedro-viz-build-ghpage/data/08_reporting/dummy_confusion_matrix.png, protocol=file, save_args={}, version=Version(load=None, save='2024-01-23T16.05.59.458Z')

This may not be obvious to an user what's going on. The key to resolve this is to run kedro run first because the data doesn't exist yet.
This also create a secondary problem - your CI need to include a kedro run which is a bigger ask because your CI don't necessary have access to your data i.e. S3 etc if you are just running unit tests.

Minor comments

✨ Success! Kedro-Viz build files have been successfully added to the build directory.
It would be great if the build is highlighted or showing the full directory

In additional, it would be nice if the target directory is customisable, I can think of use cases that people need to deploy in a special directory. they can always move files manually with commands like mv in the CI but it's just simpler to have it in the CLI.

-- Separate them if you have more than one.


## Your Environment
Include as many relevant details as possible about the environment you experienced the bug in:

* Web browser system and version:
* Operating system and version:
* NodeJS version used (if relevant):
* Kedro version used (if relevant):
* Python version used (if relevant):

## Checklist
- [ ] Include labels so that we can categorise your issue
@rashidakanchwala
Copy link
Contributor

i was able to replicate this issue at my end. I also tried to do kedro viz build with the new (still be merged) refactor dataset code and it seemed to solve this issue.

@rashidakanchwala
Copy link
Contributor

also love the idea of customisable file name when doing build.

@rashidakanchwala rashidakanchwala moved this to Inbox in Kedro-Viz Jan 30, 2024
@rashidakanchwala rashidakanchwala moved this from Inbox to Backlog in Kedro-Viz Jan 30, 2024
@NeroOkwa
Copy link
Contributor

@rashidakanchwala please provide more context how the refactored dataset code solves this issue.

@NeroOkwa NeroOkwa added this to the Shareable URLs milestone Feb 12, 2024
@NeroOkwa NeroOkwa moved this from Backlog to In Review in Kedro-Viz Feb 12, 2024
@SajidAlamQB
Copy link
Contributor

This PR seems to solve this issue: #1700

It would be good to know what exactly in the PR has fixed this.

@rashidakanchwala
Copy link
Contributor

Before the refactor, we overroad the load method of kedro-dataset in data_loader.py for preview purposes for both MatplotlibWriter and Plotly. This leading to considerable coupling and breaking kedro-viz specifically when

  • no kedro run has been executed previously, implying most datasets don't exist.
  • kedro-datasets were not installed.

In the refactored version, we separated kedro-viz and kedro-datasets, transferring all relevant logic to kedro-datasets. Now, in the mentioned cases, kedro viz run functions properly, but the preview feature is unavailable instead of causing kedro-viz to break.

@ravi-kumar-pilla
Copy link
Contributor

Hi @noklam , Thanks for raising this issue. I just tested the scenario mentioned and it is fixed by #1698 . This will be merged in our next release.

@github-project-automation github-project-automation bot moved this from In Review to Done in Kedro-Viz Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

5 participants