BERTopic 禁用update_topics()的警告

irlmq6kh  于 2个月前  发布在  其他
关注(0)|答案(1)|浏览(28)

当我使用update_topics()函数在进行异常值处理后更新主题时,会生成以下警告:
BERTopic - WARNING: Using a custom list of topic assignments may lead to errors if topic reduction techniques are used afterwards. Make sure that manually assigning topics is the last step in the pipeline.Note that topic embeddings will also be created through weightedc-TF-IDF embeddings instead of centroid embeddings.
正如警告中所说,我的最后一步是更新主题,但我不想让这个消息刷屏我的脚本输出。我是不是做错了什么,或者我该如何禁用这些警告?

hfwmuf9z

hfwmuf9z1#

如果你想暂时屏蔽这个特定的警告,你可以设置topic_model.verbose = False。或者,你也可以在初始化期间禁用日志记录来关闭警告。

相关问题