Exemplo n.º 1
0
 def __init__(self, url, model_name='cidmgr', model_version=-1,
              verbose=False, correlation_id=1, streaming=False):
     protocol = ProtocolType.from_str("grpc")
     self._id_registry = set()
     # make it work with both 2 and 3 as InferContext does not
     # inherit from object, so super in broken in 2.
     InferContext.__init__(self,
         url, protocol, model_name, model_version, 
         verbose, correlation_id, streaming)
Exemplo n.º 2
0
 def __init__(self, url, model_name, model_version=None,
              verbose=False, cidmgr_context=None, streaming=False):
     if not cidmgr_context:
         cidmgr_context = CIDMgrContext(url, verbose=verbose)
     self.cidmgr=cidmgr_context
     protocol = ProtocolType.from_str("grpc")
     correlation_id = self.cidmgr.new()
     # make it work with both 2 and 3 as InferContext does not
     # inherit from object, so super in broken in 2.
     InferContext.__init__(self,
         url, protocol, model_name, model_version, 
         verbose, correlation_id, streaming)