__init__.py 文件源码

python
阅读 36 收藏 0 点赞 0 评论 0

项目:skills-labeller 作者: workforce-data-initiative 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号