eric-haibin-lin commented on a change in pull request #15124: [MXNET-1294]
Priority-based parameter propagation for improved data parallel training
throughput
URL: https://github.com/apache/incubator-mxnet/pull/15124#discussion_r370967522
##########
File path: python/mxnet/model.py
##########
@@ -69,15 +69,14 @@ def _create_sparse_kvstore(kvstore):
update_on_kvstore : bool. Always True.
"""
# always update on kvstore
- update_on_kvstore = True
if isinstance(kvstore, kvs.KVStore):
kv = kvstore
elif isinstance(kvstore, str):
kv = kvs.create(kvstore)
else:
raise TypeError("Cannot create '%s' KVStore with row_sparse
parameters. "
"The type must be KVStore or str." % kvstore)
- return (kv, update_on_kvstore)
Review comment:
row_sparse weight requires `update_on_kvstore=True`. The weights are stored
in the server, and the worker only pull a subset of the weight in each
iteration for mini-batch training.
Could you instead add an assertion here `assert
kv.is_capable(kvs.KVStoreBase.OPTIMIZER) is True`?
----------------------------------------------------------------
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