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

feat: %burr_ui magic to launch UI from notebook #419

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

zilto
Copy link
Collaborator

@zilto zilto commented Nov 8, 2024

This allows to launch Burr UI from a notebook. This is particularly useful in Google Colab environments because it automatically fowards the necessary port.


Important

Adds %burr_ui IPython magic to launch Burr UI from notebooks, supporting Google Colab and Jupyter environments.

  • New Feature:
    • Adds %burr_ui IPython magic command in burr/integrations/notebook.py to launch Burr UI from notebooks.
    • Supports Google Colab and Jupyter environments.
  • Functions:
    • identify_notebook_environment() determines the notebook environment.
    • launch_ui_colab() and launch_ui_jupyter() handle UI launching for Colab and Jupyter.
    • NotebookMagics class implements the %burr_ui magic.
  • Documentation:
    • Updates docs/concepts/tracking.rst to include usage of %burr_ui for launching Burr UI from notebooks.

This description was created by Ellipsis for b087e32. It will automatically update as commits are pushed.

@zilto zilto added enhancement New feature or request integrations labels Nov 8, 2024
Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Reviewed everything up to 54ad5d2 in 45 seconds

More details
  • Looked at 174 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 4 drafted comments based on config settings.
1. burr/integrations/notebook.py:74
  • Draft comment:
    Consider refactoring launch_ui_jupyter and launch_ui_colab to avoid code duplication. Both functions have similar subprocess calls, which can be extracted into a common function.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The code in launch_ui_jupyter and launch_ui_colab is almost identical except for the URL handling. It would be better to refactor this to avoid code duplication.
2. burr/integrations/notebook.py:89
  • Draft comment:
    Consider handling exceptions more gracefully in launch_ui. Currently, only ModuleNotFoundError is caught, but other exceptions might occur during subprocess execution.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The launch_ui function should handle exceptions more gracefully. Currently, it only catches ModuleNotFoundError, but other exceptions might occur during the subprocess execution.
3. burr/integrations/notebook.py:95
  • Draft comment:
    Consider handling exceptions more gracefully in launch_ui. Currently, only ModuleNotFoundError is caught, but other exceptions might occur during subprocess execution.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The launch_ui function should handle exceptions more gracefully. Currently, it only catches ModuleNotFoundError, but other exceptions might occur during the subprocess execution.
4. burr/integrations/notebook.py:97
  • Draft comment:
    Consider handling exceptions more gracefully in launch_ui. Currently, only ModuleNotFoundError is caught, but other exceptions might occur during subprocess execution.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The launch_ui function should handle exceptions more gracefully. Currently, it only catches ModuleNotFoundError, but other exceptions might occur during the subprocess execution.

Workflow ID: wflow_2AXH0HMlOhyq8BNU


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link

github-actions bot commented Nov 8, 2024

A preview of b087e32 is uploaded and can be seen here:

https://burr.dagworks.io/pull/419

Changes may take a few minutes to propagate. Since this is a preview of production, content with draft: true will not be rendered. The source is here: https://github.com/DAGWorks-Inc/burr/tree/gh-pages/pull/419/

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Incremental review on b087e32 in 27 seconds

More details
  • Looked at 55 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. burr/integrations/notebook.py:47
  • Draft comment:
    The comment on line 47 is unnecessary as the code is self-explanatory.
  • Reason this comment was not posted:
    Confidence changes required: 20%
    The comment on line 47 is not necessary as it is clear from the code that the exception is raised for unknown environments.
2. burr/integrations/notebook.py:79
  • Draft comment:
    The docstring mentions Colab, but this function is for Jupyter. Update the docstring to reflect that it is for Jupyter.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The docstring for launch_ui_jupyter mentions Colab, which is incorrect. It should be updated to reflect that it is for Jupyter.

Workflow ID: wflow_6cs6XLkhxPNmEtr3


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request integrations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants