You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2021/10/27 17:10:53 UTC

[GitHub] [incubator-mxnet] barry-jin edited a comment on pull request #20572: [API] Standardize MXNet NumPy creation functions

barry-jin edited a comment on pull request #20572:
URL: https://github.com/apache/incubator-mxnet/pull/20572#issuecomment-953131562


   > Thanks @barry-jin for the change! The library-wide change of context to device is certainly a large endeavor and an important step towards API standard compatibility.
   > 
   > One concern I have is about the use of ctx/context arguments in other functions. I think instead of resulting in unknown arguments we want to give existing users deprecation warnings for those arguments for one release.
   
   Yes, I agree. In this pr, I also reserve [context.py](https://github.com/barry-jin/incubator-mxnet/blob/data-api-creation-func/python/mxnet/context.py) to help inform the user about the context/ctx argument being deprecated. Also, in most of the functions using ctx as keyword, they will be wrapped with [decorator](https://github.com/barry-jin/incubator-mxnet/blob/data-api-creation-func/python/mxnet/util.py#L702) to change ctx to device. For function names which include ctx like reset_ctx, I will create a new one like reset_device and add deprecation warning to reset_ctx, like [this](https://github.com/barry-jin/incubator-mxnet/blob/f67701a5d8fd399224bf0dad7a85ba8806da6972/python/mxnet/gluon/block.py#L758-L775)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org