cli.py 文件源码

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

项目:acton 作者: chengsoonong 项目源码 文件源码
def recommend(
        diversity: float,
        recommendation_count: int,
        recommender: str,
        verbose: bool,
):
    # Logging setup.
    logging.warning('Not implemented: diversity')
    logging.captureWarnings(True)
    if verbose:
        logging.root.setLevel(logging.DEBUG)

    # Read the predictions protobuf.
    predictions = read_binary()
    predictions = acton.proto.wrappers.Predictions.deserialise(predictions)

    # Write the recommendations protobuf.
    proto = acton.acton.recommend(
        predictions=predictions,
        recommender=recommender,
        n_recommendations=recommendation_count)
    write_binary(proto.proto.SerializeToString())


# acton-label
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号