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

render_graph() has hidden dependencies #189

Open
2 tasks
cshumaker-irb opened this issue Jun 6, 2022 · 0 comments
Open
2 tasks

render_graph() has hidden dependencies #189

cshumaker-irb opened this issue Jun 6, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@cshumaker-irb
Copy link

render_graph() is improperly documented and is not portable

Use Case

Better support for render_graph() allows not just exploration through notebooks, it enables real production software projects. It provides feedback that doesn't require deployment in the AWS Console or through an automated deployment pipeline. It helps with documentation and code reviews.

It's a highly valuable tool in the SDK that only works in a notebook.

Proposed Solution

Update the docs:

The second link says it doesn't work in JupyterLab but it doesn't explicitly say that it only works in Jupyter Notebooks. I believe SageMaker and EMR Notebooks both use JupyterLab at this point.

If nothing is going to be done, this implementation should at least be deprecated because it's so selectively useful and is a red herring for people looking for this functionality.

Other

The current render_graph() method provides very unclear documentation. There is no mention of the Ipython requirement and the logs warning the user can easily be silenced without them ever knowing.

If you try to dig into the render_graph() method, you'll find the WorkflowGraphWidget and the show() method that generates some HTML object for IPython. In order to get something potentially useful, I checked out the "data" attribute of the HTML that was generated and found a CSS link and a JS script tag and a div with an svg tag. It appears that the widget generates the html containing javascript to generate the definition.

This could be much better. For one, the docs need to be updated to reflect the dependencies.

For actual rendering, you could:

  • Use an explicitly imported Python library
  • Generate HTML that works outside of IPython
  • Add a function in Boto3 to fetch the image URL or bytes
  • Add a publicly accessible endpoint that accepts the definition JSON
  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

@cshumaker-irb cshumaker-irb added the bug Something isn't working label Jun 6, 2022
@cshumaker-irb cshumaker-irb changed the title short issue description render_graph() has hidden dependencies Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant