mxnet icon indicating copy to clipboard operation
mxnet copied to clipboard

[RoadMap] Legacy issue resolution before 1.0 release

Open piiswrong opened this issue 9 years ago • 31 comments

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.

piiswrong avatar Aug 02 '17 22:08 piiswrong

should check kAddTo support for operators

feiyulv avatar Aug 03 '17 06:08 feiyulv

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

piiswrong avatar Aug 04 '17 06:08 piiswrong

Yes, an operator file (or otherwise) to support IDE code completion would be greatly welcomed.

jmacglashan avatar Aug 04 '17 18:08 jmacglashan

also need to change all the DType(expf()) etc to use math function with proper precision

piiswrong avatar Aug 04 '17 22:08 piiswrong

Default epsilon in Symbol/NDArray batch norm are too large (1e-3). Gluon now uses 1e-5, which is more commonly used.

szha avatar Aug 05 '17 19:08 szha

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

eric-haibin-lin avatar Aug 06 '17 18:08 eric-haibin-lin

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?

jmacglashan avatar Aug 08 '17 20:08 jmacglashan

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.

ptrendx avatar Aug 08 '17 21:08 ptrendx

Should enable multiple times resource requests

ZihengJiang avatar Aug 08 '17 22:08 ZihengJiang

@ptrendx @madjam @bhavinthaker The removed tutorials need to be brought back ASAP!

piiswrong avatar Aug 14 '17 06:08 piiswrong

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).

asmushetzel avatar Aug 16 '17 12:08 asmushetzel

Ops that are differentiable are missing gradients. (e.g. 'norm')

szha avatar Aug 23 '17 22:08 szha

+1 on higher-order gradients #5699

altosaar avatar Sep 07 '17 13:09 altosaar

Create appropriate namespaces so that APIs are grouped logically and do not end up with prefix qualifiers such as linalg_ , random_ etc.

madjam avatar Sep 07 '17 20:09 madjam

@madjam this is already worked on by @reminisce and @eric-haibin-lin

szha avatar Sep 07 '17 20:09 szha

@szha thanks. Is it being tracked in a separate issue?

madjam avatar Sep 07 '17 20:09 madjam

@madjam I think it's already merged.

szha avatar Sep 07 '17 20:09 szha

@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.

reminisce avatar Sep 07 '17 20:09 reminisce

@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?

eric-haibin-lin avatar Sep 07 '17 21:09 eric-haibin-lin

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
...
...

formath avatar Sep 13 '17 07:09 formath