nemo_gym.data.tasks.harbor.models
nemo_gym.data.tasks.harbor.models
Pydantic mirror of Harbor’s task.toml (schema 1.4).
Field names are Harbor’s. Deprecated spellings (version, memory, storage,
allow_internet) are read and normalized but never written back; the pre-1.3 multi_step_reward_mode
is accepted and dropped, as Harbor drops it. Keys this mirror does not know are ignored, as Harbor ignores
them; HarborSettings.unknown_keys lists them so the loader can say so.
Module Contents
Classes
Functions
Data
HARBOR_STEP_VERIFIER_TIMEOUT_SEC
API
Bases: HarborSettings
One artifacts entry: a path copied out of the agent’s sandbox after it finishes.
A bare string is the source. destination is where it lands relative to the run’s
artifacts folder (default: the source path without its leading slash). service names a
Compose sidecar; None or "main" is the agent’s own container.
Bases: HarborSettings
[[verifier.collect]]: a command run in a service before its artifacts are collected.
Bases: HarborPhaseSettings
[environment]: the sandbox the agent works in.
docker_image is optional. A task without one builds from
environment/Dockerfile or, when that file only names a base image, runs the
base image directly.
Bases: HarborSettings
Mirrors Harbor’s HealthcheckConfig: plain numbers with Harbor’s defaults and no bounds.
Published tasks pin values at the lower bound (retries = 0: one attempt once the start
period ends), and Harbor loads them; bounding the fields here rejected those tasks.
Bases: BaseModel
Dotted paths of the keys in data that no field of this model tree declares.
Bases: HarborSettings
Bases: HarborSettings
One task.toml.
Harbor runs the verifier in the agent’s container unless the task says otherwise.
As in Harbor, [verifier].environment_mode = "separate" or a [verifier.environment]
block selects the separate mode, where a fresh container receives /logs/artifacts and
the declared artifacts. A verifier is shared unless the mode is "separate" or a
[verifier.environment] block is declared.
The step’s own [steps.verifier].timeout_sec, else Harbor’s step default of 600 s, never the task’s
[verifier].timeout_sec (HARBOR_STEP_VERIFIER_TIMEOUT_SEC).
Bases: HarborSettings
One [[steps]] entry of task.toml (Harbor’s StepConfig): a step of the task, which the task
author defines and grades, not a step of a trajectory (nemo_gym.trajectory.atif_v1_7.AtifStep).
The loader pairs it with its steps/<name>/ folder into a HarborTurn, as HarborTaskConfig pairs
with its folder into a HarborTask. The step has its own instruction (steps/<name>/instruction.md)
and verifier (the task’s tests/ with steps/<name>/tests/ on top). min_reward stops the episode
after this step when its rewards fall short: a number gates the reward key, a mapping gates each named
key, and a step without a verifier result fails every gate.
Bases: HarborPhaseSettings
[steps.agent]: unset values fall back to the task’s [agent], as in Harbor.
Bases: HarborPhaseSettings
[steps.verifier]: user, env, environment_mode and environment fall back to the task’s
[verifier] as Harbor resolves them (_step_verifier_user, resolve_step_verifier_mode,
resolve_effective_verifier_env_config). timeout_sec does not: Harbor’s step verifier is a
VerifierConfig of its own with the 600 s default, so a step that names none is graded within
HARBOR_STEP_VERIFIER_TIMEOUT_SEC, whatever the task’s [verifier].timeout_sec says
(HarborTaskConfig.step_verifier_timeout_sec; the loader warns when the two differ). collect is the
step’s own [[steps.verifier.collect]] hooks, run after the task’s in the step’s collection pass (Harbor’s
_collect_hooks_for: the task’s hooks, then the step’s). A shared step cannot declare its own environment, as
the task’s verifier cannot (Harbor’s _validate_mode_env_consistency is on the class both share).
Bases: HarborPhaseSettings
[verifier]. inputs is a Gym extension Harbor has no field for, set from the dataset’s dataset.toml
([gym.tasks."<task_id>".verifier] inputs = [...]): the names of files under /logs/verifier a Compose
sidecar writes during the rollout for test.sh to read (kumo’s verifier service appends actions.jsonl
for main’s tests/score.py). The server empties /logs/verifier before a shared verification and
before the next turn of a multi-step task; these names alone survive, as regular files, so an agent-planted
report or reward is never left for the grader. Plain file names: no path separators, never the grader’s own
outputs (VERIFIER_OUTPUT_NAMES).