haskell icon indicating copy to clipboard operation
haskell copied to clipboard

Include haskell source location in error messages

Open fkm3 opened this issue 9 years ago • 1 comments

Many times errors from the underlying tensorflow implementation refer to the names of op nodes and it isn't obvious what haskell code generated those nodes. withNameScope can be used to help find the offending nodes, but that technique isn't ideal.

One idea is to record the line number (or entire call stack) for every node we create, then, when an error occurs we can attempt to parse the node names out of the error message and display their locations alongside the original error. If parsing the error message is too difficult, maybe we can dump the entire mapping to a log file on error.

Another idea is to expand the tensorflow C API to allow some metadata to be passed along with each node. When an error occurs, the metadata for the relevant nodes would be included.

fkm3 avatar Nov 11 '16 02:11 fkm3

this would be amazing!

silky avatar Nov 11 '16 02:11 silky