MXNet.jl icon indicating copy to clipboard operation
MXNet.jl copied to clipboard

Option to disable logging

Open MikeInnes opened this issue 8 years ago • 1 comments

When there's an error compiling a network via bind or whatever, I get a scary-looking log in the console, as well as an error message thrown with the same text:

[16:53:59] /Users/mike/.julia.1/v0.5/MXNet/deps/src/mxnet/dmlc-core/include/dmlc/./logging.h:300: [16:53:59] src/operator/tensor/./matrix_op-inl.h:460: Check failed: lshape[1] == rshape[0] (20 vs. 21) dot shape error: (1,20) X (21,15)

Stack trace returned 53 entries:
[bt] (0) 0   libmxnet.so                         0x00000003178ae508 _ZN4dmlc15LogMessageFatalD2Ev + 40
[bt] (1) 1   libmxnet.so                         0x0000000317e0f04a _ZN5mxnet2op8DotShapeERKN4nnvm9NodeAttrsEPNSt3__16vectorINS1_6TShapeENS5_9allocatorIS7_EEEESB_ + 5050
[many more lines]

Obviously the log is redundant here, but it's also likely to make users think that something has gone wrong internally, so it'd be great to turn it off for non-developers. Aside from that I also need to remove the stack traces from error messages (I believe that changed recently); I can fairly easily strip them out by catching and processing the MXError object, but a more robust solution would be good.

MikeInnes avatar Mar 14 '17 17:03 MikeInnes

That is a problem that would need to be addressed in mxnet proper. Logging is implemented in mshadow/mshadow/logging.h

vchuravy avatar Apr 15 '17 02:04 vchuravy