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_r371052369
 
 

 ##########
 File path: python/mxnet/model.py
 ##########
 @@ -69,15 +69,15 @@ 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)
+    assert kv.is_capable(kvs.KVStoreBase.OPTIMIZER)
 
 Review comment:
   Could you also add an error message: 
   "KVStore with sparse weight requires optimizer support. However, type(kv) 
does not support optimizer. Please consider other kvstore backends (e.g. 
dist_device) instead."

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

Reply via email to