Judge

class martian_apart_hack_sdk.resources.judge.Judge(version, description, createTime, name, judgeSpec)[source]

A Judge resource representing a Martian judge configuration.

This class serves as the primary interface for judge operations in the SDK. Judge instances are returned by JudgeClient methods (create_judge, get, list) and are used as parameters for operations like evaluating completions or training routers.

Judges should not be created from this class. Instead, use the JudgeClient to create and manage judges.

The Judge is immutable. You can not update it directly from instances of this class. Instead, use the JudgeClient to update the judge. Any updates create a new version of the judge with an incremented version number. Previous versions remain accessible through the JudgeClient.get() method.

id

The judge’s identifier.

Type:

str

version

The judge version number. Increments with each update.

Type:

int

description

A human-readable description of the judge’s purpose.

Type:

str

createTime

When the judge was created (RFC 3339 format).

Type:

str

name

The judge’s full resource name (format: “organizations/{org}/judges/{judge_id}”).

Type:

str

judgeSpec

The judge’s configuration, including rubric and evaluation settings.

Type:

Dict[str, Any]

Parameters:
  • version (int)

  • description (str)

  • createTime (str)

  • name (str)

  • judgeSpec (Dict[str, Any])

__post_init__()[source]

Extract the judge ID from the full resource name and set the id field.

The ID is taken from the last segment of the name path. For example, from “organizations/org-123/judges/my-judge”, the ID would be “my-judge”.