JobResult
Contains comprehensive results from a completed Harbor job, including statistics, metrics, and individual trial results. Import:from harbor.models.job.result import JobResult
Fields
UUID
required
Unique identifier for this job run.
datetime
required
Timestamp when the job started.
datetime | None
default:"None"
Timestamp when the job finished. None if job is still running.
int
required
Total number of trials configured for this job.
JobStats
required
Aggregate statistics across all trials.
list[TrialResult]
default:"[]"
Individual results from each trial execution.
Example
JobStats
Aggregate statistics across all trials in a job. Import:from harbor.models.job.result import JobStats
Fields
int
default:"0"
Total number of trials executed.
int
default:"0"
Total number of trials that encountered errors.
dict[str, AgentDatasetStats]
default:"{}"
Statistics grouped by agent, model, and dataset. Keys are formatted as
agent__model__dataset or agent__dataset.Methods
format_agent_evals_key
str
required
Name of the agent.
str | None
required
Model name if applicable.
str
required
Dataset name.
str
Formatted key like
"claude-code__anthropic-claude-opus-4-1__terminal-bench" or "oracle__adhoc".from_trial_results
list[TrialResult]
required
List of completed trial results.
JobStats
Computed statistics object.
increment
TrialResult
required
Trial result to add.
remove_trial
TrialResult
required
Trial result to remove.
update_trial
TrialResult
required
New trial result.
TrialResult | None
Previous result if this is a retry.
Example
AgentDatasetStats
Statistics for a specific agent-dataset combination. Import:from harbor.models.job.result import AgentDatasetStats
Fields
int
default:"0"
Number of trials for this agent-dataset combination.
int
default:"0"
Number of trials that encountered errors.
list[dict[str, Any]]
default:"[]"
Computed metric values (e.g., mean, max, min of rewards).
dict[str, dict[float | int, list[str]]]
default:"{}"
Reward distribution mapping:
{reward_name: {reward_value: [trial_names]}}.dict[str, list[str]]
default:"{}"
Exception distribution mapping:
{exception_type: [trial_names]}.Example
Type Aliases
These type aliases are used internally for reward tracking:Rewards
Mapping of reward names to numeric values.TrialRewardsMap
Mapping of trial names to their rewards.EvalsRewardsMap
Mapping of evaluation keys to trial rewards.Complete Example
Related Types
- JobConfig - Job configuration
- TrialResult - Individual trial results
- MetricConfig - Metric definitions