astonzhang commented on a change in pull request #8763: Add mxnet.text APIs
URL: https://github.com/apache/incubator-mxnet/pull/8763#discussion_r160299359
 
 

 ##########
 File path: python/mxnet/registry.py
 ##########
 @@ -29,6 +29,23 @@
 _REGISTRY = {}
 
 
+def get_registry(base_class):
+    """Get registrator.
+
+    Parameters
+    ----------
+    base_class : type
+        base class for classes that will be registered
+
+    Returns
+    -------
+    a registrator
+    """
+    if base_class not in _REGISTRY:
+        _REGISTRY[base_class] = {}
+    return _REGISTRY[base_class]
 
 Review comment:
   Resolved.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to