update_evaluator
Rename an Evaluator, save updated Python source as a new version, or do both while preserving past run versions; validate code first and check metric group weights after changes.
Instructions
Renames an Evaluator, saves new source as a new version, or both. Send only what changes.
New source adds a version; the Evaluator's Metric Groups judge with the newest version from the next
run on, and past runs keep the version they used. Validate the new code with try_evaluator
first. Source the Evaluator already had in its history adds no version, so reverting is safe.
hub-api rejects code that changes what an existing Metric measures (its shape, grain or range,
a narrowed vocabulary), and a changed declaration can make a Metric Group weight unusable: check
weights with list_metric_groups afterwards. Read the current source with get_evaluator.
:param evaluator_id: The Evaluator's id.
:param name: The new name; must not be taken.
:param python_code: The new Python source.
:returns: The Evaluator, or an error message.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| python_code | No | ||
| evaluator_id | Yes |