-
Notifications
You must be signed in to change notification settings - Fork 113
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
Enable %run_viz magic line to use the arguments that Kedro-Viz supports on the command line #1733
Enable %run_viz magic line to use the arguments that Kedro-Viz supports on the command line #1733
Conversation
Signed-off-by: Sajid Alam <[email protected]>
Signed-off-by: Sajid Alam <[email protected]>
Signed-off-by: Sajid Alam <[email protected]>
Signed-off-by: Sajid Alam <[email protected]>
Signed-off-by: Sajid Alam <[email protected]>
Signed-off-by: Sajid Alam <[email protected]>
Signed-off-by: Sajid Alam <[email protected]>
Hi @SajidAlamQB , Approach looks good to me. I tried testing on jupyter, the default pipeline works well i.e., when --pipeline arg is not passed. But if I pass the --pipeline arg, I see the below behavior.
It might not be an issue for this ticket rather a bug if this happens via cli as well (need to check) |
Thanks @ravi-kumar-pilla I tried the same thing and did not see the |
Not sure. I will try on Safari, in the mean time can you try on Chrome as well ? Thank you |
Hey @ravi-kumar-pilla and @ankatiyar, so I've been trying to use the Problem 1:When doing This seems to stem from the way spaces are handled between the equal sign and the arguments. It appears that the parser interprets everything after the space as a new, unknwon argument rather than being a whole string. This can be easily avoided though if we skip the equals with something like Problem 2:The following problem comes when we do
We can get around this problem by manually stripping of the quotes before we can use the value, but it is an extra step and might not be the most maintainable way to do this. Both the problems seem to come from how |
@SajidAlamQB Does |
Hi @SajidAlamQB , I feel we should stick to providing options with @ankatiyar we do have spaces for pipeline names on viz. I am not aware that this is not allowed. |
I tired |
I think Maybe this is a separate issue though. |
Given what we have discussed I tend to agree with @ravi-kumar-pilla that due to the issues of |
@ravi-kumar-pilla regarding the issue with the |
Opened an issue about the pipeline naming. Other than that, it was not clear to me if this PR is still desired and waiting for review. |
Hi @astrojuanlu , Thank you for creating a new ticket. This PR is almost done but we still have the issue of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
happy to merge this for now and we can fix the issue with browser rendering in another PR
Description
Related to: #1699
make
%run_viz
magic line support to passing any arguments ofkedro viz run
in notebooks.Follow up PRs should update the documentation on this: https://docs.kedro.org/en/stable/notebooks_and_ipython/kedro_and_notebooks.html#run-viz-line-magic
Development notes
A lot of the logic is borrowed from
cli.py
I had initially tried to use the click context for line magic but it was becoming quite complicated. I think the easiest approach is to just manually do the logic for these arguments.Example flow:
QA notes
I have't added a comprehensive test suite for most of this new logic as it already tested in the
cli.py
and didn't want to repeat them again. Let me know if you all think otherwise.Checklist
RELEASE.md
file