def __init__(self,
host=None,
port=None,
cmd=" ".join([VW_CMD, VW_ARGS])):
self.SKILL_CANDIDATES = "candidates" # backing for ordered importances
self.TIMESTAMP = "timestamp" # string of last timestamp value
self.REDIS = "redis" # Host name Redis container in service docker network
self.cmd = cmd
self.host = host
self.port = port
self.oracle = None
command = None
if not self.check_socket(host=self.host, port=self.port):
command = self.cmd
# Stand up/Connect to an instance of vowpal wabbit
self.oracle = DaemonVWProcess(command=self.cmd,
port=self.port,
ip=self.host)
self.redis_db = redis.StrictRedis(host=self.REDIS)# defaults to redis:6379
__init__.py 文件源码
python
阅读 36
收藏 0
点赞 0
评论 0
评论列表
文章目录