[
https://issues.apache.org/jira/browse/BEAM-14515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17542282#comment-17542282
]
Ning commented on BEAM-14515:
-----------------------------
Our existing logic is coupled with IPython, not Jupyter; most of the usage
supports any IPython notebook runtime such as Colab.
The missing part: anything "displayed" by IPython can be saved to an HTML file;
we need a new "save" API for it right before any "display" call. An example we
have is in the screen diff integration test:
[https://github.com/apache/beam/blob/master/sdks/python/apache_beam/runners/interactive/testing/integration/notebook_executor.py.]
One proposal for 2 changes:
1. Decouple the output and output channel: Output such as
print/log/plot/HTML/JS should be decoupled from the channel that surface the
output such as Python output/IPython console/save-to-file/notebook messaging.
2. Decide what features should be supported even if the current environment is
not in IPython: abstract those.
> Decouple interactive Beam from Jupyter
> --------------------------------------
>
> Key: BEAM-14515
> URL: https://issues.apache.org/jira/browse/BEAM-14515
> Project: Beam
> Issue Type: Improvement
> Components: runner-py-interactive
> Reporter: Brian Hulette
> Priority: P2
>
> Some aspects of interactive Beam (e.g. triggering execution with ib.collect)
> make sense to use outside of a Jupyter notebook. We should make sure that
> use-cases like this are possible, and we only require a notebook if it's
> actually necessary. In my mind that should just be features that are
> _explicitly_ integrating with Jupyter, like side panels, custom magics, etc...
> Things like caching and plotting tools even make sense to use outside of
> Jupyter (a plotting tool can return a handle that the user could use to save
> the plot as an image).
--
This message was sent by Atlassian Jira
(v8.20.7#820007)