Manage Tasks & Tasksets
Manage Tasks & Tasksets
A task is a stored, reusable definition of an agent-eval unit of work: an intent (what the agent
should do), the inputs it receives, and the metrics that score it. A taskset is a named grouping
of tasks. Both are first-class entities in the Evaluator plugin, addressed by workspace/name and
managed through the nemo_platform SDK.
Use stored tasks and tasksets when you want to define an evaluation unit once and reference it across runs, share it across a team, or assemble suites — rather than re-declaring the intent, inputs, and metrics inline every time.
Concepts
Both are addressed by workspace/name. Names are unique within a workspace, limited to 255
characters, and must match ^[\w\-\.]+$.
Every stored task and taskset is versioned. Creating one publishes revision 1; replacing its content publishes the next revision. Earlier revisions stay readable for as long as the task or taskset exists — deleting it removes its revisions with it — which is what lets an evaluation be re-run against exactly the content it ran against the first time.
Publishing is idempotent. Replacing a task with content identical to its current revision publishes nothing and returns the existing revision — so a pipeline can re-submit the same definition freely without accumulating versions.
Initialize the SDK
Manage Tasks
A task scores its output with metrics. Store the metric first, then reference it from the task by
workspace/name. See Manage Metrics for the
metric classes and options.
Send the task as a TaskInput (the authorable subset of a task) and address it by name on create.
Reference the stored metric with a MetricRef (workspace/name, or a bare name resolved against
the task’s workspace). The service returns the stored Task.
TaskInput fields
Task kinds
A task is an evaluation unit; its kind says which runner executes it. There are two:
evaluator— the task’s content is fields you author, scored by platform metrics.harbor— the task’s content is a packaged directory of files, scored by Harbor’s own reward.
Both are stored as the same record type, so a taskset can group them and you manage every evaluation unit in one place regardless of which runner executes it.
EvaluatorTaskDefinition (kind="evaluator"):
HarborTaskDefinition (kind="harbor"):
Storing a Harbor task is supported; running one from storage is not yet. A taskset may group both
kinds, but expanding a harbor member is rejected with 422 before the run starts, whatever target
you submit against. Harbor evaluations continue to run through the existing dataset-driven path.
A stored task holds metric references only. Any inline metric bundle you pass on create is stored
as a content-addressed derived metric, and the task record is normalized to reference it. This is
why stored.spec.metrics always comes back as a list of MetricRef references.
Retrieve, list, and delete
sort accepts name, created_at, or updated_at, each optionally prefixed with - for
descending order.
Revisions
Publish a new revision
Use replace to publish new content. It creates the task if it does not exist, so a publisher needs
no existence check.
Submitting content identical to the current revision publishes nothing and returns the existing revision — but any tags in the body are still applied, which is how you tag a revision after the fact.
List revisions
Each entry carries the content_hash used to pin a reference.
Read a specific revision
Pass a content digest or a tag. This returns the content as published, not the current content.
Tag a revision
A tag is a mutable pointer to a revision — useful for marking one as reviewed or approved after it
has been evaluated. Read it back with tag=, the counterpart to revision=:
revision= takes a content digest and tag= takes a tag name. They select the same thing two ways,
so pass one or the other — passing both raises ValueError.
A tag names exactly one revision. Re-tagging moves the pointer rather than adding a second one, so
retrieve(tag=...) always resolves to a single revision — there is no way for two revisions to
share a tag.
latest is managed automatically and always names the most recently published revision; it cannot be
moved by hand. A tag name may not be empty, and may not look like a content digest (64 hexadecimal
characters) — such a tag could be stored but never resolved, because a digest-shaped reference is
looked up as a digest rather than as a tag.
Manage Tasksets
A taskset references existing tasks by workspace/name. All referenced tasks must already exist when
the taskset is created; a missing or duplicate reference is rejected.
Member references are resolved to an exact revision when the taskset is stored. You may submit a
bare name (capital-of-france), a tag (capital-of-france#latest), or a digest — what gets stored
is always workspace/name#<digest>. This is why a stored taskset keeps naming the same content even
after a member task publishes something new, and it is what makes a suite reproducible.
TasksetInput fields
Retrieve, list, and delete
Tasksets carry the same revision surface as tasks — replace, list_revisions, tag, and
retrieve(revision=...) / retrieve(tag=...):
Re-submitting the same member names can still publish a new revision. Members are re-resolved on every write, so if a member task published in the meantime the grouping now names different content and genuinely differs. A taskset’s identity is the exact revisions it names, not the names alone.
Member order, by contrast, is not part of that identity: membership is a set, so it is stored in a canonical order and reordering the same members publishes nothing.
Deleting a taskset does not delete its member tasks — a taskset only holds references.
Run an evaluation over a taskset
An agent evaluation is submitted with an AgentEvalInputSpec, whose tasks field is either an
inline list of tasks or a reference to a stored taskset. Referencing a taskset lets you keep the
task definitions in one place and evaluate the whole set by name, instead of inlining every task on
each run.
When the job runs, the taskset reference is resolved like this:
- The taskset revision the ref names is loaded — the current one unless the ref pins a revision (see Pin the taskset itself).
- Each member of that revision is loaded at the revision pinned in the taskset, not the task’s current tip.
- Metric references on those members are hydrated into runnable metrics, the same as for inline tasks.
- Re-running the same taskset therefore evaluates the same content, even if a member has been republished since.
To evaluate the new task content, publish a new taskset revision (for example
tasksets.replace(...)) so membership is re-resolved to the newer digests.
Submit this spec as the agent-evaluate job input; see Agent Evaluation for the full run, target, and results flow.
The inline form remains available for one-off tasks — swap tasks=TasksetRef(...) for
tasks=[AgentEvalTaskInput(...), ...].
Pin the taskset itself
A bare TasksetRef expands the taskset’s current revision, so it follows the suite forward every
time the taskset is republished. Add a #<tag-or-digest> fragment to pin the grouping too:
What each form is stable against:
Every taskset revision pins its members by digest, so neither form is disturbed when a member task publishes new content on its own — that is the guarantee stored membership buys you.
The two differ on replace. A bare ref tracks the taskset’s own revisions, and members are
re-resolved on every write — so a replace can change both which tasks are named and the
content they resolve to, even when the submitted member names were identical. Pin the taskset when a
benchmark number has to stay comparable across that.
A fragment that no longer resolves fails the evaluation rather than falling back to the current revision.
A member’s grader-only reference (held-out ground truth) is loaded from the pinned revision along
with the rest of its content, so a taskset-driven run grades against the ground truth that revision
fixed. Because reference is covered by the revision digest, changing it publishes a new revision —
a pin fixes the grading, not just the prompt.
Async usage
AsyncNeMoPlatform exposes the same surface; await each call.
Workspaces and projects
Every method accepts an optional workspace argument that overrides the client’s default workspace.
On create, an optional project argument associates the task or taskset with a project. When you
omit workspace, the client’s configured workspace is used.
REST API
The SDK resources are a thin client over the Evaluator plugin REST API, mounted under
/apis/evaluator/v2/workspaces/{workspace}:
Edge Cases
PUT distinguishes its two outcomes by status: 201 when a new revision was published, and
200 when the submitted content was already the current revision and nothing was cut. The rest:
Related Topics
- Manage Metrics - Define and reuse the metrics that score a task
- SDK Resources - Run and submit evaluations through the Evaluator plugin
- Agent Evaluation - How agent-eval tasks are executed and scored