Skip to main content

TrialConfig

Defines the configuration for a single trial execution, combining task, agent, environment, and verifier settings. Import: from harbor.models.trial.config import TrialConfig

Fields

TaskConfig
required
Configuration specifying which task to run.
str
default:"auto-generated"
Unique name for this trial. Auto-generated as {task_name}__{short_uuid} if not provided.
Path
default:"Path('trials')"
Directory where trial results are stored.
float
default:"1.0"
Global multiplier applied to all timeout values.
float | None
default:"None"
Specific multiplier for agent timeout. Overrides timeout_multiplier for agent execution.
float | None
default:"None"
Specific multiplier for verifier timeout. Overrides timeout_multiplier for verification.
float | None
default:"None"
Specific multiplier for agent setup timeout.
float | None
default:"None"
Specific multiplier for environment build timeout.
AgentConfig
default:"AgentConfig()"
Agent configuration for this trial.
EnvironmentConfig
default:"EnvironmentConfig()"
Environment configuration for this trial.
VerifierConfig
default:"VerifierConfig()"
Verifier configuration for this trial.
list[str | ArtifactConfig]
default:"[]"
Files or directories to collect from the environment after trial completion.
UUID | None
default:"None"
ID of the parent job, if this trial is part of a job.

Methods

generate_trial_name

Generates a unique trial name based on the task name and a short UUID.
str
Generated name in format {task_name[:32]}__{7-char-uuid}.

Equality

TrialConfig implements custom equality that excludes the trial_name field, allowing comparison based on configuration content.

Example

AgentConfig (Trial-Level)

Agent configuration for trial execution. Import: from harbor.models.trial.config import AgentConfig

Fields

str | None
default:"None"
Agent name (e.g., 'claude-code', 'openhands'). Defaults to 'oracle' if both name and import_path are None.
str | None
default:"None"
Custom agent import path in format 'module.path:ClassName' for non-built-in agents.
str | None
default:"None"
Model identifier in format provider/model-name (e.g., 'anthropic/claude-opus-4-1').
float | None
default:"None"
Override the agent timeout from task configuration.
float | None
default:"None"
Override the agent setup timeout.
float | None
default:"None"
Maximum allowed timeout (caps the computed timeout after multipliers).
dict[str, Any]
default:"{}"
Additional agent-specific keyword arguments passed to the agent constructor.
dict[str, str]
default:"{}"
Environment variables to set for the agent process.

Example

EnvironmentConfig (Trial-Level)

Environment configuration for trial execution. Import: from harbor.models.trial.config import EnvironmentConfig

Fields

EnvironmentType | None
default:"None"
Environment type (DOCKER, DAYTONA, MODAL, E2B, etc.). Defaults to DOCKER if both type and import_path are None.
str | None
default:"None"
Custom environment import path for non-built-in environments.
bool
default:"False"
Force rebuild of the environment image.
bool
default:"True"
Delete the environment after trial completion.
int | None
default:"None"
Override CPU allocation from task config. Warning: May disqualify from leaderboards.
int | None
default:"None"
Override memory allocation in MB. Warning: May disqualify from leaderboards.
int | None
default:"None"
Override storage allocation in MB. Warning: May disqualify from leaderboards.
int | None
default:"None"
Override GPU allocation. Warning: May disqualify from leaderboards.
bool
default:"False"
Suppress warnings about resource overrides affecting leaderboard eligibility.
dict[str, Any]
default:"{}"
Additional environment-specific keyword arguments.

Example

VerifierConfig (Trial-Level)

Verifier configuration for trial execution. Import: from harbor.models.trial.config import VerifierConfig

Fields

float | None
default:"None"
Override the verifier timeout from task configuration.
float | None
default:"None"
Maximum allowed verifier timeout.
bool
default:"False"
Disable verification for this trial.

Example

TaskConfig (Trial-Level)

References a task to run in the trial. Import: from harbor.models.trial.config import TaskConfig

Fields

Path
required
Path to the task directory.
str | None
default:"None"
Git repository URL if task is from a Git source.
str | None
default:"None"
Git commit ID for the task.
bool
default:"False"
Overwrite cached task if it exists.
Path | None
default:"None"
Directory to download remote tasks to.
str | None
default:"None"
Source dataset name.

Methods

is_git_task

bool
True if this is a Git-based task (git_url is not None).

get_task_id

LocalTaskId | GitTaskId
The appropriate TaskId based on whether this is a Git or local task.

Example

ArtifactConfig

Configuration for collecting files from trial environments. Import: from harbor.models.trial.config import ArtifactConfig

Fields

str
required
Source path in the environment (supports glob patterns).
str | None
default:"None"
Destination path relative to trial directory. If None, uses the source basename.

Example

Complete Example