piiswrong commented on a change in pull request #10833: [WIP] Change class 
variables to thread local variables
URL: https://github.com/apache/incubator-mxnet/pull/10833#discussion_r187237079
 
 

 ##########
 File path: python/mxnet/context.py
 ##########
 @@ -109,15 +112,37 @@ def __repr__(self):
         return self.__str__()
 
     def __enter__(self):
-        self._old_ctx = Context.default_ctx
-        Context.default_ctx = self
+        if not hasattr(Context._default_ctx, "value"):
 
 Review comment:
   why do you need this? Isn't it set with 
https://github.com/apache/incubator-mxnet/pull/10833/files#diff-1a5e06031378f44204fd1da1fffc0b07R145

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to