[RoadMap] Legacy issue resolution before 1.0 release
We are working on multiple new features and refactors (gluon, sparse, engine, etc) towards an 1.0 release. But there are also some legacy issues that needs to be resolved. Here is a list of issues I have noted. Feel free to raise new issues or contribute fixes.
@mli @tqchen @eric-haibin-lin @reminisce @asmushetzel @jermainewang @ptrendx
Basic
- Sort out int32, int64, index_t, mx_uint etc. Currently TShape uses int64_t but the front-end and back-end interface still use uint32_t for indices. This need cleaning up and int64_t interface need to be exposed through a new set of CAPI. The general policy going forward should be to use int64_t for indices/size and int32_t for number of dimensions. Signed int should be used for function arguments unless there is a really strong reason to use unsigned. Most indexing related interface should support negative indexing.
- Deprecate mshadow. Remove usage of mshadow template evaluations and replace with Kernel::Launch or hand written cpu/gpu kernels.
- Verify type and shape support for operators. Currently some operators don't support types other than fp32 for legacy reasons. Proper type support and/or documentation should be added. Currently some operators have limit support for tensor ranks (maximum 5 dims). The limit needs to be increased or removed if possible.
- move legacy operators to new nnvm registration. Conv, FC, BN etc should be refactored into stateless operators and use thread_local to store cudnn tensor descriptors.
- remove mkl experimental and use the new storage type interface.
Stretch goals
- Support pybind11 or cython interface for faster python API.
- Use variant type instead of string for operator argument parsing.
should check kAddTo support for operators
I saw a few complaints that MXNet doesn't support IDE code completion due to operator registration. one solution is to generate an operator file instead of creating it everytime
Yes, an operator file (or otherwise) to support IDE code completion would be greatly welcomed.
also need to change all the DType(expf()) etc to use math function with proper precision
Default epsilon in Symbol/NDArray batch norm are too large (1e-3). Gluon now uses 1e-5, which is more commonly used.
kvstore has a new str interface, while the updater always uses int as the key, which is not consistent. https://github.com/apache/incubator-mxnet/blob/master/src/kvstore/kvstore_local.h#L83
I think the biggest feature mxnet lacks is the higher order gradients (see #5699). This is probably a fairly substantial feature, but is there any plan for this or Hessian-vector products for 1.0?
For me the biggest feature mxnet lacks is consistent and full documentation and tutorials. Gluon tutorial seems to be pretty awesome (although still incomplete), but the rest of the API does not have such good treatment. It got even worse once you removed most examples from the website (even though I agree that they were not well explained). From the technical and performance point of view MXNet is a great (and probably the best actually) but it's hard to take off when others have lower barrier of entry and spend a lot on PR.
Should enable multiple times resource requests
@ptrendx @madjam @bhavinthaker The removed tutorials need to be brought back ASAP!
Should we also work on error handling? Basically getting more useful and more consistent messages when a model not build correctly by the user (shape inference fails etc).
Ops that are differentiable are missing gradients. (e.g. 'norm')
+1 on higher-order gradients #5699
Create appropriate namespaces so that APIs are grouped logically and do not end up with prefix qualifiers such as linalg_ , random_ etc.
@madjam this is already worked on by @reminisce and @eric-haibin-lin
@szha thanks. Is it being tracked in a separate issue?
@madjam I think it's already merged.
@madjam Namespace refactoring is covered in this PR. https://github.com/apache/incubator-mxnet/pull/7604 @eric-haibin-lin may have more coverage for documentation.
@madjam the docs for separate namespace is merged in #7712 @piiswrong could you update the task status so that ppl are aware which ones have been assigned / done?
Embedding op should be optimized for large sparse id. Now, the embedding layer use the input id as the raw index of embedding matrix. In some circumstance, id may be generated using uint64 hash so not suitable. This feature is much needed in industrial click through rate prediction, recommendation system and other uses.
Maybe, embedding matrix should be like this and partitioned to the server nodes of ps using sparse_id like that of tensorflow.
sparse_id1 vector
sparse_id2 vector
...
...