我正在尝试为我的模型制作一个评估器。到目前为止,所有其他组件都很好,但是当我尝试此配置时:
eval_config = tfma.EvalConfig(
model_specs=[
tfma.ModelSpec(label_key='Category'),
],
metrics_specs=tfma.metrics.default_multi_class_classification_specs(),
slicing_specs=[
tfma.SlicingSpec(),
tfma.SlicingSpec(feature_keys=['Category'])
])
使这个评估者:
model_resolver = ResolverNode(
instance_name='latest_blessed_model_resolver',
resolver_class=latest_blessed_model_resolver.LatestBlessedModelResolver,
model=Channel(type=Model),
model_blessing=Channel(type=ModelBlessing))
context.run(model_resolver)
evaluator = Evaluator(
examples=example_gen.outputs['examples'],
model=trainer.outputs['model'],
baseline_model=model_resolver.outputs['model'],
eval_config=eval_config)
context.run(evaluator)
青春有我
相关分类