Printing error message for huge ChainerX array blocks REPL
See original GitHub issueWhen the type of function’s argument is incompatible, chainerx
tries to show TypeError
with the details of the invoked array X
in the Invoked with:
section. If the X
is huge, ChainerX still shows all data contained in X
. It takes much time and blocks REPL.
>>> import chainerx as chx
>>> X = chx.arange(10000000) # huge data
>>> x = X.take([0], axis=1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: take(): incompatible function arguments. The following argument types are supported:
1. (self: chainerx.ndarray, indices: chainerx.ndarray, axis: Optional[int]=None) -> chainerx.ndarray
Invoked with: array([[0., 0.],
[0., 0.]], shape=(2, 2), dtype=float64, device='cuda:0'), [0]; kwargs: axis=1
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Abbreviate output of `chainerx::ArrayRepr` for large inputs by ...
Successfully merging this pull request may close these issues. Abbreviate output of str() for large ChainerX arrays Printing error message for huge ......
Read more >Terminal Printing Error - Replit
I've been having a problem where the terminal seems to print lines to the bottom right rather than directly below itself. The repl...
Read more >Chainer Documentation - Read the Docs
As per the warning above, the forward_cpu() method returns a tuple of single element. Note that all arrays appearing.
Read more >chainerx.squared_error — Chainer 7.8.1 documentation
Can be used to compute mean squared error by just calling mean() on the output array. Parameters. x0 (ndarray) – Input variable.
Read more >Swift: Google's Bet on Differentiable Programming
AIUI they hired another huge contributor to LLVM/Clang/Swift to work ... the only problems are 1) its focus is it being used from...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the catch! The message is auto-generated by pybind11, so there are two options.
__repr__
to omit middle items when the array is too large.I’m not sure if we can accomplish the option 1 (I think we should anyway have a way to customize it, though…). The option 2 is anyway needed for other places. We can follow the format used in NumPy, whose
__repr__
also omits middle items of large arrays.It is still a problem in invoking such as
.reshape(-1)
.