eric-haibin-lin commented on a change in pull request #17010: [API] unified API
for custom kvstores
URL: https://github.com/apache/incubator-mxnet/pull/17010#discussion_r357867542
##########
File path: python/mxnet/model.py
##########
@@ -122,10 +130,10 @@ def _initialize_kvstore(kvstore, param_arrays,
arg_params, param_names, update_o
"""Initialize kvstore"""
for idx, param_on_devs in enumerate(param_arrays):
name = param_names[idx]
- kvstore.init(name, arg_params[name])
-
- if update_on_kvstore:
- kvstore.pull(name, param_on_devs, priority=-idx)
+ if not update_on_kvstore or arg_params[name].stype != 'default':
Review comment:
ok, i can update the branch condition. The stype is specified in ndarray
documentation e.g.
https://github.com/apache/incubator-mxnet/blob/master/python/mxnet/ndarray/utils.py#L51-L52
default = dense
row_sparse = row_sparse
csr = compressed sparse row
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services