Uploaded image for project: 'Livy'
  1. Livy
  2. LIVY-764

[PythonShell] Give code block a filename and cache it in linecache

Agile BoardAttach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 0.9.0
    • REPL

    Description

      Today python shell (fake_shell) uses 'stdin' as file name to compile code blocks and never caches them in linecache. This breaks the user code that depends on "inspect.findsource", like "torch.jit.script"

       

      To enable code block caching at the backend, we can use the way how ipython does: https://github.com/ipython/ipython/blob/44bd47d5ac27805a297798d39ad7e31f63181468/IPython/core/compilerop.py#L54

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            mzhang Zhang

            Dates

              Created:
              Updated:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0h
              0h
              Logged:
              Time Spent - 40m
              40m

              Slack

                Issue deployment