如何自定义TFX评估器组件
我们正在使用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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论