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
评论列表
文章目录