Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

MXNet currently has support for handling dmlc::Error exceptions in the backend and propagating them to frontend for both the operators and the iterators case.

There is a still some work needed w.r.t Exception Handling. This document lists out all the further improvements that can be done for the exception handling feature.

Improved Exception Types for the Backend

Currently, there are only three exceptions available for MXNet C++ backend: dmlc::Error, InferTypeError (inherits from dmlc::Error) and InferShapeError(inherits from dmlc::Error).

...

and https://github.com/apache/incubator-mxnet/blob/master/src/operator/operator_common.h#L85

Improved Exception Types for the Frontend Language Bindings - (Python, Scala, Perl..)

Will require a mapping of error codes and corresponding frontend exceptions.

...

Frontend exception checking for Python example: https://github.com/apache/incubator-mxnet/blob/master/python/mxnet/base.py#L137

Support for handling exception thrown from consumed libraries

Currently we are handling only dmlc::Error and terminating the process for other exceptions. Once we have finished the above two tasks,

...

and std::exception are handled and propagated to frontend.