如何自定义TFX评估器组件

发布于 2025-01-29 07:14:17 字数 352 浏览 3 评论 0原文

我们正在使用TFX开发ML管道,该模型是具有密度层的Keras顺序DNN。我们想自定义评估者组件,以比较他们在我们选择的测试集上的预测来比较祝福和候选模型。因此,鉴于测试集,我们希望通过使用自定义指标来询问两个模型的预测,并确定哪种模型是最好的。 根据官方文档,似乎我们应该创建一个自定义Python文件,并通过 module_file 参数将其提供给评估器组件,但是没有有关此文件必须如何的信息。例如,评估器组件调用哪些功能? (例如,教练组件调用 run_fn )。该功能应该返回什么输出?

我们正在使用:

  • TF版本:2.6.3
  • TFX版本:1.4.0

谢谢!

We are developing a ML pipeline with TFX, the model is a Keras sequential DNN with mostly dense layers. We would like to customize the Evaluator component to compare the blessed and the candidate model by comparing their predictions on a test set of our choice. Therefore given the test set we want to ask both models for predictions and decide which model is the best by using a custom metric.
Based on the official documentation, it seems that we should create a custom python file and provide it to the Evaluator component via the module_file parameter, however there are no information about how this file has to be. For example, which are the functions that the Evaluator component calls? (for example the trainer component calls run_fn). What output should this function return?

We are using:

  • TF Version: 2.6.3
  • TFX Version: 1.4.0

Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文