create_evaluator
Creates an Evaluator from Python source and adds it to your workspace. Attach it to Metric Groups so it can score pipeline outputs.
Instructions
Creates an Evaluator from Python source and adds it to the workspace. Judged Metrics cost money when run.
Always validate new code first: run it on a real Session with try_evaluator and fix what it
reports before saving. python_code is the Evaluation Function; its @metrics declaration
names the Metrics it reports, and hub-api rejects code whose declaration it cannot read. Start
from list_evaluator_templates rather than from scratch. The name must be unused in the
workspace. The Evaluator scores nothing until a Metric Group runs it: add it to existing groups
with metric_group_ids (each at the end of its set), to a new group with
new_metric_group_name, or later with update_metric_group. Change it later with
update_evaluator.
:param name: The Evaluator's name; must not exist in the workspace yet.
:param python_code: The Evaluation Function's Python source.
:param metric_group_ids: Existing Metric Groups to add it to.
:param new_metric_group_name: Also creates a Metric Group of this name holding only this Evaluator.
:returns: The created Evaluator, or an error message.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| python_code | Yes | ||
| metric_group_ids | No | ||
| new_metric_group_name | No |