question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Output in jupyter cells gets truncated

See original GitHub issue

Issue Type: Bug

Python environment set up with: `conda -n numba47 -c numba python=3 numba jupyter

The output of very long jupyter output cells gets truncated at the beginning.

Code to reproduce, run the following in “Python Interactive”:

# %%
from numba import njit, jit
import numpy as np
from llvmlite import binding as llvm

llvm.set_option("", "--debug-only=loop-vectorize")


@njit(fastmath=True)
def foo(x):
    acc = 0
    for v in np.nditer(x):
        acc += v.item()
    return acc


a = np.ones((100,), dtype=np.float32)
foo(a)

print(foo.inspect_llvm(foo.signatures[0]))

# %%

The output should have 695 lines with 40279 characters:

LV: Checking a loop in "_ZN8__main__7foo$241E5ArrayIfLi1E1C7mutable7alignedE" from foo
LV: Loop hints: force=? width=0 unroll=0
LV: Found a loop: B20

<... snipped ...>

!7 = distinct !{!7, !"_ZN8__main__7foo$241E5ArrayIfLi1E1C7mutable7alignedE"}
!8 = distinct !{!8, !1}
!9 = distinct !{!9, !3, !1}

Output has “only” 371 lines with 20368 characters:

i8, i8* %29, i64 %sunkaddr81
  %sunkaddr83 = getelementptr i8, i8* %sunkaddr82, i64 112
  %30 = bitcast i8* %sunkaddr83 to <4 x float>*

<... snipped ...>

!7 = distinct !{!7, !"_ZN8__main__7foo$242E5ArrayIfLi1E1C7mutable7alignedE"}
!8 = distinct !{!8, !1}
!9 = distinct !{!9, !3, !1}

Note that it gets truncated at the beginning.

Also: I verified that jupyter used without vscode DOES show the complete output.

Extension version: 2019.11.50794 VS Code version: Code 1.41.1 (26076a4de974ead31f97692a0d32f90d735645c0, 2019-12-18T14:58:56.166Z) OS version: Windows_NT x64 10.0.17763

System Info
Item Value
CPUs Intel® Core™ i5-5300U CPU @ 2.30GHz (4 x 2295)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off
surface_control: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 7.88GB (2.58GB free)
Process Argv
Screen Reader no
VM 0%

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
ARF1commented, Jan 9, 2020

@IanMatthewHuff For what it’s worth, I think that fixing full output is not urgent IF users get a message that their output was truncated and how to “fix” it themselves in the settings.

1reaction
ARF1commented, Jan 7, 2020

@IanMatthewHuff Thanks for taking the time to let me know.

Not sure if it is related but the output in the vscode integrated shell (cmd) also gets truncated, though at the end if I remember correctly. (Have not tried with powershell.)

I have been meaning to file a separate report but have not gotten around to it yet. Thought I would let you know just in case it helps…

Read more comments on GitHub >

github_iconTop Results From Across the Web

IPython Notebook output cell is truncating contents of my list
I have a long list (about 4000 items) whose content is suppressed when I try to display it in an ipython notebook output...
Read more >
Output in jupyter cells gets truncated · Issue #2475 - GitHub
The output of very long jupyter output cells gets truncated at the beginning. Code to reproduce, run the following in "Python Interactive":.
Read more >
Limit Output - Unofficial Jupyter Notebook Extensions
This extension limits the number of characters a codecell will output as text or HTML. This also allows the interruption of endless loops...
Read more >
how to show full function arguments in cell output - Notebook ...
Truncated function info being displayed within jupyter notebook cell output - how to show full function arguments in cell output.
Read more >
Capture Databricks' cells truncated outputs - DS Stream
Unfortunately, there are cases, when Databricks will remove some parts of the output. It will happen when our script will generate hundreds of ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found