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 2018/12/29 23:26:24 UTC

[GitHub] eric-haibin-lin closed pull request #13742: Reorder module import orders for dist-kvstore

eric-haibin-lin closed pull request #13742: Reorder module import orders for dist-kvstore
URL: https://github.com/apache/incubator-mxnet/pull/13742
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/python/mxnet/__init__.py b/python/mxnet/__init__.py
index e960829e691..374a3b50bbb 100644
--- a/python/mxnet/__init__.py
+++ b/python/mxnet/__init__.py
@@ -54,7 +54,6 @@
 from . import lr_scheduler
 # use mx.kv as short for kvstore
 from . import kvstore as kv
-from . import kvstore_server
 # Runtime compile module
 from . import rtc
 # Attribute scope to add attributes to symbolic graphs
@@ -82,3 +81,11 @@
 from . import gluon
 
 __version__ = base.__version__
+
+# Dist kvstore module which launches a separate process when role is set to "server".
+# This should be done after other modules are initialized.
+# Otherwise this may result in errors when unpickling custom LR scheduler/optimizers.
+# For example, the LRScheduler in gluoncv depends on a specific version of MXNet, and
+# checks the __version__ attr of MXNet, which is not set on kvstore server due to the
+# fact that kvstore-server module is imported before the __version__ attr is set.
+from . import kvstore_server


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services