Uploaded image for project: 'Zeppelin'
  1. Zeppelin
  2. ZEPPELIN-1423

Allow users to specify pre/post-execute hooks for interpreters

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.6.1
    • 0.7.0
    • Interpreters
    • None

    Description

      Currently there is no easy way to specify

      With ZEPPELIN-1344, one of the requirements for interactive inline matplotlib plotting involves displaying images without explicitly calling a show() function. Eg,

      import matplotlib.pyplot as plt
      plt.plot([1, 2, 3])
      

      should display an inline image even without calling plt.show() if mpl's interactive flag is enabled.

      Currently this could be done in the pyspark interpreter by binding the figure's byte-string representation to the AngularDisplay system (since that can easily be updated through the matplotlib backend) but closing the figures (ie freeing up memory) would have to manually be done by the user. Thus we would need a post-execute callback that displays / cleans up all the active figure objects.

      I will attempt to implement this using a new InterpreterCallback interface which includes support for two event types, pre and post-execute (relative to the paragraph). This would ideally lay down the foundation to make it possible for users to specify their callback code to the interpreter.

      Attachments

        Issue Links

          Activity

            People

              agoodman Alex Goodman
              agoodman Alex Goodman
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: