【发布时间】:2017-05-20 11:16:18
【问题描述】:
我正在使用 Python 脚本使用 Spark ML 的 ALS 例程计算用户和项目潜在因素,如 here 所述。
计算潜在因素后,我尝试使用以下方法将这些因素保存到 S3:
model = als.fit(ratings)
# save items latent factors
model.itemFactors.rdd.saveAsTextFile(s3path_items)
# save users latent factors
model.userFactors.rdd.saveAsTextFile(s3path_users)
大约有 1.5 亿用户。 LFA 的计算速度很快(约 15 分钟),但将潜在因子写入 S3 需要将近 5 个小时。很明显,有些事情是不对的。你能帮忙找出问题吗?
我在使用 ALS 计算 LFA 时使用了 100 个用户块和 100 个项目块 - 以防这些信息可能相关。
使用 100 台 r3.8xlarge 机器完成这项工作。
【问题讨论】:
标签: amazon-web-services apache-spark amazon-s3 pyspark