@evolvingmachines/evolve 0.0.65 → 0.0.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-DK2MGUPB.js → chunk-RFLMRPGK.js} +5 -5
- package/dist/cli/index.cjs +39 -39
- package/dist/cli/index.d.cts +3 -3
- package/dist/cli/index.d.ts +3 -3
- package/dist/cli/index.js +30 -30
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/{types-B_qmzlMk.d.cts → types-84M4J_Vm.d.cts} +11 -44
- package/dist/{types-B_qmzlMk.d.ts → types-84M4J_Vm.d.ts} +11 -44
- package/package.json +4 -4
- package/skills/create-adapter/SKILL.md +71 -26
- package/skills/create-task/SKILL.md +124 -66
- package/skills/evolve/SKILL.md +37 -20
- package/skills/evolve-evals/SKILL.md +142 -69
- package/skills/evolve-evals/references/cli-reference/agent.md +76 -0
- package/skills/evolve-evals/references/cli-reference/analysis.md +78 -0
- package/skills/evolve-evals/references/cli-reference/analyze.md +95 -0
- package/skills/evolve-evals/references/cli-reference/auth.md +96 -0
- package/skills/evolve-evals/references/cli-reference/check.md +156 -0
- package/skills/evolve-evals/references/cli-reference/dataset.md +154 -0
- package/skills/evolve-evals/references/cli-reference/filesystem.md +168 -0
- package/skills/evolve-evals/references/cli-reference/index.md +149 -0
- package/skills/evolve-evals/references/cli-reference/job.md +198 -0
- package/skills/evolve-evals/references/cli-reference/run.md +187 -0
- package/skills/evolve-evals/references/cli-reference/secrets.md +77 -0
- package/skills/evolve-evals/references/cli-reference/session.md +56 -0
- package/skills/evolve-evals/references/cli-reference/skill.md +52 -0
- package/skills/evolve-evals/references/cli-reference/skills.md +85 -0
- package/skills/evolve-evals/references/cli-reference/trial.md +115 -0
- package/skills/evolve-evals/references/cli-reference/upload.md +72 -0
- package/skills/evolve-evals/references/core-concepts/agents.md +96 -0
- package/skills/evolve-evals/references/core-concepts/analyze.md +143 -0
- package/skills/evolve-evals/references/core-concepts/check.md +116 -0
- package/skills/evolve-evals/references/core-concepts/compatibility.md +39 -0
- package/skills/evolve-evals/references/core-concepts/compose.md +103 -0
- package/skills/evolve-evals/references/core-concepts/datasets.md +234 -0
- package/skills/evolve-evals/references/core-concepts/index.md +52 -0
- package/skills/evolve-evals/references/core-concepts/jobs.md +223 -0
- package/skills/evolve-evals/references/core-concepts/models.md +73 -0
- package/skills/evolve-evals/references/core-concepts/multi-step.md +93 -0
- package/skills/evolve-evals/references/core-concepts/rewardkit.md +341 -0
- package/skills/evolve-evals/references/core-concepts/sandboxes.md +73 -0
- package/skills/evolve-evals/references/core-concepts/secrets.md +86 -0
- package/skills/evolve-evals/references/core-concepts/sharing.md +81 -0
- package/skills/evolve-evals/references/core-concepts/skills.md +100 -0
- package/skills/evolve-evals/references/core-concepts/task-config.md +169 -0
- package/skills/evolve-evals/references/core-concepts/task-environment.md +127 -0
- package/skills/evolve-evals/references/core-concepts/task-reference.md +191 -0
- package/skills/evolve-evals/references/core-concepts/task-verifiers.md +209 -0
- package/skills/evolve-evals/references/core-concepts/tasks.md +90 -0
- package/skills/evolve-evals/references/core-concepts/teams.md +128 -0
- package/skills/evolve-evals/references/core-concepts/trial-outputs.md +225 -0
- package/skills/evolve-evals/references/core-concepts/trials.md +129 -0
- package/skills/evolve-evals/references/core-concepts/upload-sdk-session.md +240 -0
- package/skills/evolve-evals/references/core-concepts/upload.md +166 -0
- package/skills/evolve-evals/references/dashboard/checks.md +54 -0
- package/skills/evolve-evals/references/dashboard/datasets.md +65 -0
- package/skills/evolve-evals/references/dashboard/jobs.md +106 -0
- package/skills/evolve-evals/references/dashboard/traces.md +54 -0
- package/skills/evolve-evals/references/dashboard/trial-viewer.md +77 -0
- package/skills/evolve-evals/references/getting-started/first-task.md +228 -0
- package/skills/evolve-evals/references/getting-started/installation.md +79 -0
- package/skills/evolve-evals/references/getting-started/quick-start.md +100 -0
- package/skills/evolve-evals/references/index.md +58 -0
- package/skills/evolve-evals/references/sdk/http.md +110 -0
- package/skills/evolve-evals/references/sdk/python.md +108 -0
- package/skills/evolve-evals/references/sdk/typescript.md +104 -0
- package/skills/evolve-evals/references/sdk-reference/agents.md +75 -0
- package/skills/evolve-evals/references/sdk-reference/analyses.md +124 -0
- package/skills/evolve-evals/references/sdk-reference/auth.md +171 -0
- package/skills/evolve-evals/references/sdk-reference/checks.md +145 -0
- package/skills/evolve-evals/references/sdk-reference/datasets.md +170 -0
- package/skills/evolve-evals/references/sdk-reference/error-codes.md +231 -0
- package/skills/evolve-evals/references/sdk-reference/errors.md +98 -0
- package/skills/evolve-evals/references/sdk-reference/filesystem.md +166 -0
- package/skills/evolve-evals/references/sdk-reference/index.md +161 -0
- package/skills/evolve-evals/references/sdk-reference/jobs.md +250 -0
- package/skills/evolve-evals/references/sdk-reference/meta.md +54 -0
- package/skills/evolve-evals/references/sdk-reference/methods/agents.md +154 -0
- package/skills/evolve-evals/references/sdk-reference/methods/analyses.md +211 -0
- package/skills/evolve-evals/references/sdk-reference/methods/auth.md +257 -0
- package/skills/evolve-evals/references/sdk-reference/methods/checks.md +460 -0
- package/skills/evolve-evals/references/sdk-reference/methods/datasets.md +687 -0
- package/skills/evolve-evals/references/sdk-reference/methods/filesystem.md +527 -0
- package/skills/evolve-evals/references/sdk-reference/methods/jobs.md +1021 -0
- package/skills/evolve-evals/references/sdk-reference/methods/meta.md +209 -0
- package/skills/evolve-evals/references/sdk-reference/methods/secrets.md +157 -0
- package/skills/evolve-evals/references/sdk-reference/methods/skills.md +125 -0
- package/skills/evolve-evals/references/sdk-reference/methods/trials.md +371 -0
- package/skills/evolve-evals/references/sdk-reference/secrets.md +104 -0
- package/skills/evolve-evals/references/sdk-reference/skills.md +66 -0
- package/skills/evolve-evals/references/sdk-reference/trials.md +164 -0
- package/skills/evolve-evals/references/sdk-reference/types.md +1249 -0
- package/skills/publish/SKILL.md +103 -79
- package/skills/rewardkit/SKILL.md +78 -23
- package/spec/openapi.yaml +19 -74
- package/skills/evolve-evals/references/cli-reference/agent.mdx +0 -79
- package/skills/evolve-evals/references/cli-reference/analysis.mdx +0 -160
- package/skills/evolve-evals/references/cli-reference/analyze.mdx +0 -84
- package/skills/evolve-evals/references/cli-reference/auth.mdx +0 -133
- package/skills/evolve-evals/references/cli-reference/check.mdx +0 -263
- package/skills/evolve-evals/references/cli-reference/dataset.mdx +0 -151
- package/skills/evolve-evals/references/cli-reference/index.mdx +0 -108
- package/skills/evolve-evals/references/cli-reference/job.mdx +0 -278
- package/skills/evolve-evals/references/cli-reference/run.mdx +0 -204
- package/skills/evolve-evals/references/cli-reference/secrets.mdx +0 -95
- package/skills/evolve-evals/references/cli-reference/skill.mdx +0 -61
- package/skills/evolve-evals/references/cli-reference/skills.mdx +0 -81
- package/skills/evolve-evals/references/cli-reference/trial.mdx +0 -181
- package/skills/evolve-evals/references/cli-reference/upload.mdx +0 -36
- package/skills/evolve-evals/references/core-concepts/agents.mdx +0 -106
- package/skills/evolve-evals/references/core-concepts/analyze.mdx +0 -86
- package/skills/evolve-evals/references/core-concepts/check.mdx +0 -64
- package/skills/evolve-evals/references/core-concepts/datasets.mdx +0 -138
- package/skills/evolve-evals/references/core-concepts/index.mdx +0 -42
- package/skills/evolve-evals/references/core-concepts/jobs.mdx +0 -151
- package/skills/evolve-evals/references/core-concepts/models.mdx +0 -68
- package/skills/evolve-evals/references/core-concepts/sandboxes.mdx +0 -52
- package/skills/evolve-evals/references/core-concepts/secrets.mdx +0 -41
- package/skills/evolve-evals/references/core-concepts/sharing.mdx +0 -35
- package/skills/evolve-evals/references/core-concepts/skills.mdx +0 -42
- package/skills/evolve-evals/references/core-concepts/tasks.mdx +0 -216
- package/skills/evolve-evals/references/core-concepts/teams.mdx +0 -36
- package/skills/evolve-evals/references/core-concepts/trial-outputs.mdx +0 -117
- package/skills/evolve-evals/references/core-concepts/trials.mdx +0 -103
- package/skills/evolve-evals/references/core-concepts/upload.mdx +0 -93
- package/skills/evolve-evals/references/dashboard/checks.mdx +0 -21
- package/skills/evolve-evals/references/dashboard/datasets.mdx +0 -24
- package/skills/evolve-evals/references/dashboard/jobs.mdx +0 -65
- package/skills/evolve-evals/references/dashboard/traces.mdx +0 -17
- package/skills/evolve-evals/references/dashboard/trial-viewer.mdx +0 -30
- package/skills/evolve-evals/references/getting-started/installation.mdx +0 -56
- package/skills/evolve-evals/references/getting-started/quick-start.mdx +0 -94
- package/skills/evolve-evals/references/index.mdx +0 -48
- package/skills/evolve-evals/references/sdk/python.mdx +0 -161
- package/skills/evolve-evals/references/sdk/typescript.mdx +0 -163
- package/skills/evolve-evals/references/sdk-reference/agents.mdx +0 -108
- package/skills/evolve-evals/references/sdk-reference/analyses.mdx +0 -222
- package/skills/evolve-evals/references/sdk-reference/auth.mdx +0 -116
- package/skills/evolve-evals/references/sdk-reference/checks.mdx +0 -300
- package/skills/evolve-evals/references/sdk-reference/datasets.mdx +0 -346
- package/skills/evolve-evals/references/sdk-reference/errors.mdx +0 -210
- package/skills/evolve-evals/references/sdk-reference/index.mdx +0 -60
- package/skills/evolve-evals/references/sdk-reference/jobs.mdx +0 -822
- package/skills/evolve-evals/references/sdk-reference/meta.mdx +0 -52
- package/skills/evolve-evals/references/sdk-reference/skills.mdx +0 -69
- package/skills/evolve-evals/references/sdk-reference/trials.mdx +0 -302
- package/skills/evolve-evals/references/sdk-reference/types.mdx +0 -274
- package/skills/evolve-evals/references/snippets/global-options.mdx +0 -13
- package/skills/evolve-evals/references/snippets/list-flags.mdx +0 -23
|
@@ -1,822 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "jobs"
|
|
3
|
-
description: "Start, follow, and derive jobs."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
`jobs()` returns the jobs client. Every job method takes a job id, and every derived run returns a new `Job`.
|
|
7
|
-
|
|
8
|
-
## start
|
|
9
|
-
|
|
10
|
-
<Tabs>
|
|
11
|
-
<Tab title="TypeScript">
|
|
12
|
-
```ts
|
|
13
|
-
start(
|
|
14
|
-
input: JobCreate,
|
|
15
|
-
options?: StartJobOptions,
|
|
16
|
-
): Promise<Job>
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
`JobCreate`: `datasets` (selectors: `name`, optional `version`, `task_names`, `exclude_task_names`, `n_tasks`), `agents` (arms: `name`, `model_name`, optional `version`, `reasoning_effort`, `kwargs`, `preset`, `skills`), and optional `job_name`, `org` (the organization the job lands in; omitted, the client's `org` default, else your personal one), `n_attempts`, `n_concurrent_trials` (1 to 150), `max_trial_spend_usd`, `sandbox_provider`, `retry`, `analyze`, `system_log` (record the box's own system log stream beside `agent`, `verifier`, `setup` and `metrics`; off by default), the five `*_timeout_multiplier` fields, `verifier_env` (`REWARDKIT_JUDGE` and `REWARDKIT_MODEL` only) and `secrets`. `agent_env` is in the shape but refused by the server.
|
|
20
|
-
|
|
21
|
-
The response is the [Job](/sdk-reference/types#job), with the resolved `max_trial_spend_usd`, `worst_case_spend_usd`, `retry`, `analyze` and multipliers, and `org`, the slug of the organization it landed in. `options.idempotencyKey` makes a repeated call return the same job, with `idempotent_replay` true; a different request under a used key is refused with `idempotency_key_reused`.
|
|
22
|
-
|
|
23
|
-
```ts
|
|
24
|
-
const job = await jobs().start({
|
|
25
|
-
org: "acme",
|
|
26
|
-
datasets: [{ name: "terminal-bench-4", version: "4.0", n_tasks: 5 }],
|
|
27
|
-
agents: [{ name: "codex", model_name: "gpt-6-astra" }],
|
|
28
|
-
});
|
|
29
|
-
```
|
|
30
|
-
</Tab>
|
|
31
|
-
<Tab title="Python">
|
|
32
|
-
```python
|
|
33
|
-
async def start(
|
|
34
|
-
*,
|
|
35
|
-
datasets: List[DatasetSelector | dict],
|
|
36
|
-
agents: List[AgentArm | dict],
|
|
37
|
-
job_name=None,
|
|
38
|
-
org=None,
|
|
39
|
-
n_attempts=None,
|
|
40
|
-
n_concurrent_trials=None,
|
|
41
|
-
max_trial_spend_usd=None,
|
|
42
|
-
sandbox_provider=None,
|
|
43
|
-
retry=None,
|
|
44
|
-
analyze=None,
|
|
45
|
-
timeout_multiplier=None,
|
|
46
|
-
agent_timeout_multiplier=None,
|
|
47
|
-
verifier_timeout_multiplier=None,
|
|
48
|
-
agent_setup_timeout_multiplier=None,
|
|
49
|
-
environment_build_timeout_multiplier=None,
|
|
50
|
-
agent_env=None,
|
|
51
|
-
verifier_env=None,
|
|
52
|
-
secrets=None,
|
|
53
|
-
idempotency_key=None,
|
|
54
|
-
) -> Job
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
The same fields as TypeScript, as keyword arguments; `datasets` and `agents` take dicts or the `DatasetSelector` and `AgentArm` dataclasses, and `retry` is a `JobRetryConfigInput`. `idempotency_key` makes a repeated call return the same job, with `idempotent_replay` true; a different request under a used key is refused with `idempotency_key_reused`.
|
|
58
|
-
|
|
59
|
-
```python
|
|
60
|
-
job = await jobs().start(
|
|
61
|
-
org="acme",
|
|
62
|
-
datasets=[{"name": "terminal-bench-4", "version": "4.0", "n_tasks": 5}],
|
|
63
|
-
agents=[{"name": "codex", "model_name": "gpt-6-astra"}],
|
|
64
|
-
)
|
|
65
|
-
```
|
|
66
|
-
</Tab>
|
|
67
|
-
</Tabs>
|
|
68
|
-
|
|
69
|
-
## get
|
|
70
|
-
|
|
71
|
-
<Tabs>
|
|
72
|
-
<Tab title="TypeScript">
|
|
73
|
-
```ts
|
|
74
|
-
get(id: string): Promise<Job>
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
One job in full.
|
|
78
|
-
|
|
79
|
-
```ts
|
|
80
|
-
const job = await jobs().get("3e1f9a2c-…");
|
|
81
|
-
```
|
|
82
|
-
</Tab>
|
|
83
|
-
<Tab title="Python">
|
|
84
|
-
```python
|
|
85
|
-
async def get(id: str) -> Job
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
One job in full.
|
|
89
|
-
|
|
90
|
-
```python
|
|
91
|
-
job = await jobs().get("3e1f9a2c-…")
|
|
92
|
-
```
|
|
93
|
-
</Tab>
|
|
94
|
-
</Tabs>
|
|
95
|
-
|
|
96
|
-
## list
|
|
97
|
-
|
|
98
|
-
<Tabs>
|
|
99
|
-
<Tab title="TypeScript">
|
|
100
|
-
```ts
|
|
101
|
-
list(options?: { search?: string; scope?: "my" | "shared" | "org"; kind?: "job"; limit?: number; cursor?: string }): JobList
|
|
102
|
-
list(options: { kind: "check"; search?: string; scope?: "my" | "shared" | "org"; limit?: number; cursor?: string }): CheckRowList
|
|
103
|
-
list(options: { kind: "all"; search?: string; scope?: "my" | "shared" | "org"; limit?: number; cursor?: string }): JobListItemList
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
Your jobs, newest first. Await one page, or iterate every page. A task quality check is a job too: `kind: "check"` lists checks alone (each row a `CheckRow`), `kind: "all"` lists jobs and checks together (each row a `JobListItem`, told apart by its `kind`); without `kind` every row is a `Job`.
|
|
107
|
-
|
|
108
|
-
```ts
|
|
109
|
-
for await (const job of jobs().list({ search: "nightly" })) {
|
|
110
|
-
console.log(job.id, job.status);
|
|
111
|
-
}
|
|
112
|
-
for await (const row of jobs().list({ kind: "all" })) {
|
|
113
|
-
console.log(row.kind, row.id, row.status);
|
|
114
|
-
}
|
|
115
|
-
```
|
|
116
|
-
</Tab>
|
|
117
|
-
<Tab title="Python">
|
|
118
|
-
```python
|
|
119
|
-
def list(
|
|
120
|
-
*,
|
|
121
|
-
search: Optional[str] = None,
|
|
122
|
-
scope: Optional[JobListScope] = None,
|
|
123
|
-
kind: Optional[JobListKind] = None,
|
|
124
|
-
limit: Optional[int] = None,
|
|
125
|
-
cursor: Optional[str] = None,
|
|
126
|
-
)
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
Your jobs, newest first. Await one page, or iterate every page. A task quality check is a job too: `kind='check'` lists checks alone (each row a `CheckRow`), `kind='all'` lists jobs and checks together (each row a `Job` or a `CheckRow`, told apart by its `kind`); without `kind` every row is a `Job`. Both are dataclasses, so every row reads the same way.
|
|
130
|
-
|
|
131
|
-
```python
|
|
132
|
-
async for job in jobs().list(search="nightly"): print(job.id, job.status)
|
|
133
|
-
async for row in jobs().list(kind="all"):
|
|
134
|
-
print(row.kind, row.id, row.status)
|
|
135
|
-
```
|
|
136
|
-
</Tab>
|
|
137
|
-
</Tabs>
|
|
138
|
-
|
|
139
|
-
## trials
|
|
140
|
-
|
|
141
|
-
<Tabs>
|
|
142
|
-
<Tab title="TypeScript">
|
|
143
|
-
```ts
|
|
144
|
-
trials(
|
|
145
|
-
id: string,
|
|
146
|
-
options?: { status?: TrialStatus[]; dataset?: string; limit?: number; cursor?: string },
|
|
147
|
-
): TrialList
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
A job's trials. `status` and `dataset` filter.
|
|
151
|
-
|
|
152
|
-
```ts
|
|
153
|
-
const failed = await jobs().trials(
|
|
154
|
-
job.id,
|
|
155
|
-
{ status: ["INFRASTRUCTURE_ERROR", "SCORING_ERROR"] },
|
|
156
|
-
);
|
|
157
|
-
```
|
|
158
|
-
</Tab>
|
|
159
|
-
<Tab title="Python">
|
|
160
|
-
```python
|
|
161
|
-
def trials(
|
|
162
|
-
id: str,
|
|
163
|
-
*,
|
|
164
|
-
status: Optional[List[str]] = None,
|
|
165
|
-
dataset: Optional[str] = None,
|
|
166
|
-
limit: Optional[int] = None,
|
|
167
|
-
cursor: Optional[str] = None,
|
|
168
|
-
)
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
A job's trials. `status` and `dataset` filter.
|
|
172
|
-
|
|
173
|
-
```python
|
|
174
|
-
failed = await jobs().trials(
|
|
175
|
-
job.id,
|
|
176
|
-
status=["INFRASTRUCTURE_ERROR", "SCORING_ERROR"],
|
|
177
|
-
)
|
|
178
|
-
```
|
|
179
|
-
</Tab>
|
|
180
|
-
</Tabs>
|
|
181
|
-
|
|
182
|
-
## tasks
|
|
183
|
-
|
|
184
|
-
<Tabs>
|
|
185
|
-
<Tab title="TypeScript">
|
|
186
|
-
```ts
|
|
187
|
-
tasks(
|
|
188
|
-
id: string,
|
|
189
|
-
options?: { limit?: number; cursor?: string },
|
|
190
|
-
): JobTaskRollupList
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
One row per task: its trial tally, mean reward and cost, the dataset it came from (`source`), and its latest quality check (`check`, null when never checked).
|
|
194
|
-
|
|
195
|
-
```ts
|
|
196
|
-
for await (const row of jobs().tasks(job.id)) {
|
|
197
|
-
console.log(row.task_name, row.mean_reward);
|
|
198
|
-
}
|
|
199
|
-
```
|
|
200
|
-
</Tab>
|
|
201
|
-
<Tab title="Python">
|
|
202
|
-
```python
|
|
203
|
-
def tasks(
|
|
204
|
-
id: str,
|
|
205
|
-
*,
|
|
206
|
-
limit: Optional[int] = None,
|
|
207
|
-
cursor: Optional[str] = None,
|
|
208
|
-
)
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
One row per task: its trial tally, mean reward and cost, the dataset it came from (`source`), and its latest quality check (`check`, None when never checked).
|
|
212
|
-
|
|
213
|
-
```python
|
|
214
|
-
async for row in jobs().tasks(job.id): print(row.task_name, row.mean_reward)
|
|
215
|
-
```
|
|
216
|
-
</Tab>
|
|
217
|
-
</Tabs>
|
|
218
|
-
|
|
219
|
-
## watch
|
|
220
|
-
|
|
221
|
-
<Tabs>
|
|
222
|
-
<Tab title="TypeScript">
|
|
223
|
-
```ts
|
|
224
|
-
watch(id: string, options?: { onEvent?: (event: JobEvent) => void; signal?: AbortSignal; reconnectDelayMs?: number; maxReconnectDelayMs?: number }): JobWatch
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
The job's event stream. Await the handle for the final job, or iterate it for each event; one form per call, and `onEvent` fires in both. The stream replays from the beginning and reconnects on its own, backing off from `reconnectDelayMs` (default 1000) to `maxReconnectDelayMs` (default 30000). Every event type and payload is on [types](/sdk-reference/types#events); a `trial.settled` is not final while a `trial.retrying` can follow it.
|
|
228
|
-
|
|
229
|
-
```ts
|
|
230
|
-
const final = await jobs().watch(job.id);
|
|
231
|
-
```
|
|
232
|
-
</Tab>
|
|
233
|
-
<Tab title="Python">
|
|
234
|
-
```python
|
|
235
|
-
def watch(
|
|
236
|
-
id: str,
|
|
237
|
-
*,
|
|
238
|
-
on_event: Optional[Callable[[JobEvent], None]] = None,
|
|
239
|
-
timeout_s: Optional[float] = None,
|
|
240
|
-
reconnect_delay_s: float = 1.0,
|
|
241
|
-
max_reconnect_delay_s: float = MAX_WATCH_DELAY_SEC,
|
|
242
|
-
)
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
The job's event stream. Await the handle for the final job, or iterate it for each event; one form per call. The stream replays from the beginning and reconnects on its own, backing off from `reconnect_delay_s` to `max_reconnect_delay_s` (30 s). Every event type and payload is on [types](/sdk-reference/types#events); a `trial.settled` is not final while a `trial.retrying` can follow it.
|
|
246
|
-
|
|
247
|
-
```python
|
|
248
|
-
final = await jobs().watch(job.id)
|
|
249
|
-
```
|
|
250
|
-
</Tab>
|
|
251
|
-
</Tabs>
|
|
252
|
-
|
|
253
|
-
## cancel
|
|
254
|
-
|
|
255
|
-
<Tabs>
|
|
256
|
-
<Tab title="TypeScript">
|
|
257
|
-
```ts
|
|
258
|
-
cancel(id: string): Promise<Job>
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
Request cancellation. A finished job is a no-op.
|
|
262
|
-
|
|
263
|
-
```ts
|
|
264
|
-
await jobs().cancel(job.id);
|
|
265
|
-
```
|
|
266
|
-
</Tab>
|
|
267
|
-
<Tab title="Python">
|
|
268
|
-
```python
|
|
269
|
-
async def cancel(id: str) -> Job
|
|
270
|
-
```
|
|
271
|
-
|
|
272
|
-
Request cancellation. A finished job is a no-op.
|
|
273
|
-
|
|
274
|
-
```python
|
|
275
|
-
await jobs().cancel(job.id)
|
|
276
|
-
```
|
|
277
|
-
</Tab>
|
|
278
|
-
</Tabs>
|
|
279
|
-
|
|
280
|
-
## resume
|
|
281
|
-
|
|
282
|
-
<Tabs>
|
|
283
|
-
<Tab title="TypeScript">
|
|
284
|
-
```ts
|
|
285
|
-
resume(
|
|
286
|
-
id: string,
|
|
287
|
-
request?: { filter_error_types?: string[] },
|
|
288
|
-
options?: StartJobOptions,
|
|
289
|
-
): Promise<Job>
|
|
290
|
-
```
|
|
291
|
-
|
|
292
|
-
A new job over a finished job's failed or stopped trials; `source_jobs` records `action: "resume"`. The default set and the refusals are on [jobs](/core-concepts/jobs#derive-a-new-job). Supports `idempotencyKey`.
|
|
293
|
-
|
|
294
|
-
```ts
|
|
295
|
-
const next = await jobs().resume(
|
|
296
|
-
job.id,
|
|
297
|
-
{ filter_error_types: ["InfrastructureError"] },
|
|
298
|
-
);
|
|
299
|
-
```
|
|
300
|
-
</Tab>
|
|
301
|
-
<Tab title="Python">
|
|
302
|
-
```python
|
|
303
|
-
async def resume(
|
|
304
|
-
id: str,
|
|
305
|
-
*,
|
|
306
|
-
filter_error_types: Optional[List[str]] = None,
|
|
307
|
-
idempotency_key: Optional[str] = None,
|
|
308
|
-
) -> Job
|
|
309
|
-
```
|
|
310
|
-
|
|
311
|
-
A new job over a finished job's failed or stopped trials.
|
|
312
|
-
|
|
313
|
-
```python
|
|
314
|
-
next_job = await jobs().resume(
|
|
315
|
-
job.id,
|
|
316
|
-
filter_error_types=["InfrastructureError"],
|
|
317
|
-
)
|
|
318
|
-
```
|
|
319
|
-
</Tab>
|
|
320
|
-
</Tabs>
|
|
321
|
-
|
|
322
|
-
## retry
|
|
323
|
-
|
|
324
|
-
<Tabs>
|
|
325
|
-
<Tab title="TypeScript">
|
|
326
|
-
```ts
|
|
327
|
-
retry(
|
|
328
|
-
id: string,
|
|
329
|
-
request?: { trial_ids?: string[]; failed_only?: boolean },
|
|
330
|
-
options?: StartJobOptions,
|
|
331
|
-
): Promise<Job>
|
|
332
|
-
```
|
|
333
|
-
|
|
334
|
-
A new job re-running selected trials: named ids, the failed ones, or all of them; `trial_ids` and `failed_only` together is refused. The named form works on a running job once every named trial has settled; the other two need a finished source. The rules are on [jobs](/core-concepts/jobs#derive-a-new-job).
|
|
335
|
-
|
|
336
|
-
```ts
|
|
337
|
-
const again = await jobs().retry(
|
|
338
|
-
job.id,
|
|
339
|
-
{ failed_only: true },
|
|
340
|
-
);
|
|
341
|
-
```
|
|
342
|
-
</Tab>
|
|
343
|
-
<Tab title="Python">
|
|
344
|
-
```python
|
|
345
|
-
async def retry(
|
|
346
|
-
id: str,
|
|
347
|
-
*,
|
|
348
|
-
trial_ids: Optional[List[str]] = None,
|
|
349
|
-
failed_only: Optional[bool] = None,
|
|
350
|
-
idempotency_key: Optional[str] = None,
|
|
351
|
-
) -> Job
|
|
352
|
-
```
|
|
353
|
-
|
|
354
|
-
A new job re-running selected trials: named ids, the failed ones, or all of them.
|
|
355
|
-
|
|
356
|
-
```python
|
|
357
|
-
again = await jobs().retry(
|
|
358
|
-
job.id,
|
|
359
|
-
failed_only=True,
|
|
360
|
-
)
|
|
361
|
-
```
|
|
362
|
-
</Tab>
|
|
363
|
-
</Tabs>
|
|
364
|
-
|
|
365
|
-
## regrade
|
|
366
|
-
|
|
367
|
-
<Tabs>
|
|
368
|
-
<Tab title="TypeScript">
|
|
369
|
-
```ts
|
|
370
|
-
regrade(
|
|
371
|
-
id: string,
|
|
372
|
-
request?: { statuses?: TrialStatus[]; task_name?: string },
|
|
373
|
-
): Promise<Job>
|
|
374
|
-
```
|
|
375
|
-
|
|
376
|
-
Verifier-only re-run of a finished job, in fresh separate verifier boxes under the recorded network policy. The result is a job with `is_regrade` true. Only settled separate-mode trials are eligible; `no_regradable_trials` when none are. See [jobs](/core-concepts/jobs#derive-a-new-job).
|
|
377
|
-
|
|
378
|
-
```ts
|
|
379
|
-
const regraded = await jobs().regrade(
|
|
380
|
-
job.id,
|
|
381
|
-
{ task_name: "tricky-task" },
|
|
382
|
-
);
|
|
383
|
-
```
|
|
384
|
-
</Tab>
|
|
385
|
-
<Tab title="Python">
|
|
386
|
-
```python
|
|
387
|
-
async def regrade(
|
|
388
|
-
id: str,
|
|
389
|
-
*,
|
|
390
|
-
statuses: Optional[List[str]] = None,
|
|
391
|
-
task_name: Optional[str] = None,
|
|
392
|
-
) -> Job
|
|
393
|
-
```
|
|
394
|
-
|
|
395
|
-
Verifier-only re-run of a finished job. The result is a job.
|
|
396
|
-
|
|
397
|
-
```python
|
|
398
|
-
regraded = await jobs().regrade(
|
|
399
|
-
job.id,
|
|
400
|
-
task_name="tricky-task",
|
|
401
|
-
)
|
|
402
|
-
```
|
|
403
|
-
</Tab>
|
|
404
|
-
</Tabs>
|
|
405
|
-
|
|
406
|
-
## analyze
|
|
407
|
-
|
|
408
|
-
<Tabs>
|
|
409
|
-
<Tab title="TypeScript">
|
|
410
|
-
```ts
|
|
411
|
-
analyze(
|
|
412
|
-
id: string,
|
|
413
|
-
request?: AnalyzeConfigInput,
|
|
414
|
-
): Promise<Job>
|
|
415
|
-
```
|
|
416
|
-
|
|
417
|
-
Enqueue one trace analysis per trial and return at once with the job, its `stats.analysis.n_pending` counting the batch. `AnalyzeConfigInput`: `model_name`, `rubric`, `prompt`, `sandbox_provider`, `reasoning_effort`, `n_concurrent`, `passing`, `failing`, `n_trials`, `trial_ids`, all optional; `{}` is every default. `trial_ids` names the trials to analyze; it combines with `passing` or `failing` and comes before `n_trials`, and an id that is not this job's is refused with `invalid_input` naming the unknown ids. Calling it again is the re-analysis path, one wave at a time. The same object on `start()` as `analyze` arms the embedded trigger, where `trial_ids` is refused because the trials do not exist yet.
|
|
418
|
-
|
|
419
|
-
```ts
|
|
420
|
-
await jobs().analyze(
|
|
421
|
-
job.id,
|
|
422
|
-
{
|
|
423
|
-
failing: true,
|
|
424
|
-
n_trials: 20,
|
|
425
|
-
},
|
|
426
|
-
);
|
|
427
|
-
await jobs().analyze(job.id, { trial_ids: [trial.id] });
|
|
428
|
-
```
|
|
429
|
-
</Tab>
|
|
430
|
-
<Tab title="Python">
|
|
431
|
-
```python
|
|
432
|
-
async def analyze(
|
|
433
|
-
id: str,
|
|
434
|
-
*,
|
|
435
|
-
model_name=None,
|
|
436
|
-
rubric: Optional[Rubric] = None,
|
|
437
|
-
prompt=None,
|
|
438
|
-
sandbox_provider=None,
|
|
439
|
-
reasoning_effort=None,
|
|
440
|
-
n_concurrent=None,
|
|
441
|
-
passing=None,
|
|
442
|
-
failing=None,
|
|
443
|
-
n_trials=None,
|
|
444
|
-
trial_ids=None,
|
|
445
|
-
) -> Job
|
|
446
|
-
```
|
|
447
|
-
|
|
448
|
-
Enqueue one trace analysis per trial and return at once. `trial_ids` names the trials to analyze; an id that is not this job's is refused with `invalid_input` naming the unknown ids.
|
|
449
|
-
|
|
450
|
-
```python
|
|
451
|
-
await jobs().analyze(
|
|
452
|
-
job.id,
|
|
453
|
-
failing=True,
|
|
454
|
-
n_trials=20,
|
|
455
|
-
)
|
|
456
|
-
await jobs().analyze(job.id, trial_ids=[trial.id])
|
|
457
|
-
```
|
|
458
|
-
</Tab>
|
|
459
|
-
</Tabs>
|
|
460
|
-
|
|
461
|
-
## watchAnalysis
|
|
462
|
-
|
|
463
|
-
<Tabs>
|
|
464
|
-
<Tab title="TypeScript">
|
|
465
|
-
```ts
|
|
466
|
-
watchAnalysis(id: string, options?: { onStats?: (job: Job) => void; signal?: AbortSignal; pollIntervalMs?: number }): Promise<Job>
|
|
467
|
-
```
|
|
468
|
-
|
|
469
|
-
Poll until no analysis is pending, from `pollIntervalMs` (default 2000) doubling to 30 s while the tally stands still, `onStats` firing on every change. Resolves with the final job. A job that was never analyzed polls forever, so call it after `analyze()`. On a still-running job created with `analyze`, `n_pending` can touch 0 between trial settles, so the watch can return early.
|
|
470
|
-
|
|
471
|
-
```ts
|
|
472
|
-
const analyzed = await jobs().watchAnalysis(job.id);
|
|
473
|
-
```
|
|
474
|
-
</Tab>
|
|
475
|
-
<Tab title="Python">
|
|
476
|
-
```python
|
|
477
|
-
async def watch_analysis(
|
|
478
|
-
id: str,
|
|
479
|
-
*,
|
|
480
|
-
on_stats: Optional[Callable[[Job], None]] = None,
|
|
481
|
-
poll_interval_s: float = 2.0,
|
|
482
|
-
timeout_s: Optional[float] = None,
|
|
483
|
-
) -> Job
|
|
484
|
-
```
|
|
485
|
-
|
|
486
|
-
Poll until no analysis is pending. Resolves with the final job.
|
|
487
|
-
|
|
488
|
-
```python
|
|
489
|
-
analyzed = await jobs().watch_analysis(job.id)
|
|
490
|
-
```
|
|
491
|
-
</Tab>
|
|
492
|
-
</Tabs>
|
|
493
|
-
|
|
494
|
-
## compare
|
|
495
|
-
|
|
496
|
-
<Tabs>
|
|
497
|
-
<Tab title="TypeScript">
|
|
498
|
-
```ts
|
|
499
|
-
compare(ids: string[]): Promise<CompareResponse>
|
|
500
|
-
```
|
|
501
|
-
|
|
502
|
-
Two to ten jobs side by side: per-job aggregates and a per-task matrix, disagreement rows first. Means cover SCORED trials only, with `coverage` beside them. The shape is on [types](/sdk-reference/types#smaller-shapes).
|
|
503
|
-
|
|
504
|
-
```ts
|
|
505
|
-
const cmp = await jobs().compare([jobA.id, jobB.id]);
|
|
506
|
-
```
|
|
507
|
-
</Tab>
|
|
508
|
-
<Tab title="Python">
|
|
509
|
-
```python
|
|
510
|
-
async def compare(ids: List[str]) -> CompareResponse
|
|
511
|
-
```
|
|
512
|
-
|
|
513
|
-
Two to ten jobs side by side: per-job aggregates and a per-task matrix.
|
|
514
|
-
|
|
515
|
-
```python
|
|
516
|
-
cmp = await jobs().compare([job_a.id, job_b.id])
|
|
517
|
-
```
|
|
518
|
-
</Tab>
|
|
519
|
-
</Tabs>
|
|
520
|
-
|
|
521
|
-
## download
|
|
522
|
-
|
|
523
|
-
<Tabs>
|
|
524
|
-
<Tab title="TypeScript">
|
|
525
|
-
```ts
|
|
526
|
-
download(id: string): Promise<Buffer>
|
|
527
|
-
download(
|
|
528
|
-
id: string,
|
|
529
|
-
options: { to: string },
|
|
530
|
-
): Promise<string>
|
|
531
|
-
download(
|
|
532
|
-
id: string,
|
|
533
|
-
options: { stream: true },
|
|
534
|
-
): Promise<ReadableStream<Uint8Array>>
|
|
535
|
-
```
|
|
536
|
-
|
|
537
|
-
A finished job's results as one `.tar.gz` in the standard job layout: the bytes, the saved file's path, or a stream. The first two shapes are verified against the response's `Content-Length` and, when the server states one, its digest; `{ stream: true }` hands you the raw bytes to verify yourself.
|
|
538
|
-
|
|
539
|
-
```ts
|
|
540
|
-
const path = await jobs().download(
|
|
541
|
-
job.id,
|
|
542
|
-
{ to: "./results" },
|
|
543
|
-
);
|
|
544
|
-
```
|
|
545
|
-
</Tab>
|
|
546
|
-
<Tab title="Python">
|
|
547
|
-
```python
|
|
548
|
-
async def download(
|
|
549
|
-
id: str,
|
|
550
|
-
*,
|
|
551
|
-
to: Optional[str] = None,
|
|
552
|
-
)
|
|
553
|
-
```
|
|
554
|
-
|
|
555
|
-
A finished job's results as one `.tar.gz` in the standard job layout: the bytes, or with `to` the saved file's path.
|
|
556
|
-
|
|
557
|
-
```python
|
|
558
|
-
path = await jobs().download(
|
|
559
|
-
job.id,
|
|
560
|
-
to="./results",
|
|
561
|
-
)
|
|
562
|
-
```
|
|
563
|
-
</Tab>
|
|
564
|
-
</Tabs>
|
|
565
|
-
|
|
566
|
-
## upload
|
|
567
|
-
|
|
568
|
-
<Tabs>
|
|
569
|
-
<Tab title="TypeScript">
|
|
570
|
-
```ts
|
|
571
|
-
upload(source: string | { archive_url: string }, options?: { dataset?: string; onUploadProgress?: (sentBytes: number, totalBytes: number) => void; onRegistered?: (importId: string) => void }): Promise<JobImport>
|
|
572
|
-
```
|
|
573
|
-
|
|
574
|
-
Upload a job directory, its `.tar.gz`, or a public archive URL as a finished job. Returns the import record; follow it with `watchImport`. A large upload resumes after a dropped connection, and `onRegistered` hands you the import id as soon as it starts. A directory without `result.json` and `config.json` at its root is refused client-side.
|
|
575
|
-
|
|
576
|
-
```ts
|
|
577
|
-
const imp = await jobs().upload(
|
|
578
|
-
"./job-2026-08-27__12-00-00",
|
|
579
|
-
{ dataset: "terminal-bench-4@4.0" },
|
|
580
|
-
);
|
|
581
|
-
```
|
|
582
|
-
</Tab>
|
|
583
|
-
<Tab title="Python">
|
|
584
|
-
```python
|
|
585
|
-
async def upload(
|
|
586
|
-
dir_or_archive: Optional[str] = None,
|
|
587
|
-
*,
|
|
588
|
-
archive_url: Optional[str] = None,
|
|
589
|
-
dataset: Optional[str] = None,
|
|
590
|
-
on_upload_progress=None,
|
|
591
|
-
on_registered=None,
|
|
592
|
-
) -> JobImport
|
|
593
|
-
```
|
|
594
|
-
|
|
595
|
-
Upload a job directory, its `.tar.gz`, or a public archive URL as a finished job. Returns the import record.
|
|
596
|
-
|
|
597
|
-
```python
|
|
598
|
-
imp = await jobs().upload(
|
|
599
|
-
"./job-2026-08-27__12-00-00",
|
|
600
|
-
dataset="terminal-bench-4@4.0",
|
|
601
|
-
)
|
|
602
|
-
```
|
|
603
|
-
</Tab>
|
|
604
|
-
</Tabs>
|
|
605
|
-
|
|
606
|
-
## getImport, watchImport, listImports
|
|
607
|
-
|
|
608
|
-
<Tabs>
|
|
609
|
-
<Tab title="TypeScript">
|
|
610
|
-
```ts
|
|
611
|
-
getImport(id: string): Promise<JobImport>
|
|
612
|
-
watchImport(id: string, options?: { onStatus?: (jobImport: JobImport) => void; onProgress?: (progress: JobImportProgress, jobImport: JobImport) => void; pollIntervalMs?: number; signal?: AbortSignal }): Promise<JobImport>
|
|
613
|
-
listImports(options?: { status?: DatasetImportStatus; limit?: number; cursor?: string }): JobImportList
|
|
614
|
-
```
|
|
615
|
-
|
|
616
|
-
Read one upload, follow it until it settles, or list your uploads.
|
|
617
|
-
|
|
618
|
-
```ts
|
|
619
|
-
const done = await jobs().watchImport(imp.id);
|
|
620
|
-
```
|
|
621
|
-
</Tab>
|
|
622
|
-
<Tab title="Python">
|
|
623
|
-
```python
|
|
624
|
-
async def get_import(id: str) -> JobImport
|
|
625
|
-
async def watch_import(
|
|
626
|
-
id: str,
|
|
627
|
-
*,
|
|
628
|
-
on_status=None,
|
|
629
|
-
on_progress=None,
|
|
630
|
-
poll_interval_s: float = 2.0,
|
|
631
|
-
timeout_s: Optional[float] = None,
|
|
632
|
-
) -> JobImport
|
|
633
|
-
def list_imports(
|
|
634
|
-
*,
|
|
635
|
-
status: Optional[str] = None,
|
|
636
|
-
limit: Optional[int] = None,
|
|
637
|
-
cursor: Optional[str] = None,
|
|
638
|
-
)
|
|
639
|
-
```
|
|
640
|
-
|
|
641
|
-
Read one upload, follow it until it settles, or list your uploads.
|
|
642
|
-
|
|
643
|
-
```python
|
|
644
|
-
done = await jobs().watch_import(imp.id)
|
|
645
|
-
```
|
|
646
|
-
</Tab>
|
|
647
|
-
</Tabs>
|
|
648
|
-
|
|
649
|
-
## delete
|
|
650
|
-
|
|
651
|
-
<Tabs>
|
|
652
|
-
<Tab title="TypeScript">
|
|
653
|
-
```ts
|
|
654
|
-
delete(id: string): Promise<JobDeleteResult>
|
|
655
|
-
```
|
|
656
|
-
|
|
657
|
-
Permanently delete a job you created: its trials, traces, analyses and stored files. The receipt is `{ job_id, trials_deleted, analyses_deleted }`. The refusals are on [jobs](/core-concepts/jobs#stop-cancel-delete).
|
|
658
|
-
|
|
659
|
-
```ts
|
|
660
|
-
await jobs().delete(job.id);
|
|
661
|
-
```
|
|
662
|
-
</Tab>
|
|
663
|
-
<Tab title="Python">
|
|
664
|
-
```python
|
|
665
|
-
async def delete(id: str) -> JobDeleteResult
|
|
666
|
-
```
|
|
667
|
-
|
|
668
|
-
Permanently delete a job you created: its trials, traces, analyses and stored files.
|
|
669
|
-
|
|
670
|
-
```python
|
|
671
|
-
await jobs().delete(job.id)
|
|
672
|
-
```
|
|
673
|
-
</Tab>
|
|
674
|
-
</Tabs>
|
|
675
|
-
|
|
676
|
-
## share
|
|
677
|
-
|
|
678
|
-
Share a job you created by link, by email, or both. `link: true` turns on the job's unlisted link and returns it (the same link on every later call). Each address in `emails` gets an email with a link to the run and reads it after signing in with that address; an address without an account gets a sign-up link in the same email; an address already on the waitlist or holding an invite gets the share email without a sign-up link and uses that invite instead. Someone the run is shared with reads the job, its trials, traces and files and lists it under `scope: "shared"`; they cannot operate it. Only the creator may share; another member of the organization is refused with `org_forbidden`. The answer is the job's whole share state, the same shape [shares](#shares) returns.
|
|
679
|
-
|
|
680
|
-
<Tabs>
|
|
681
|
-
<Tab title="TypeScript">
|
|
682
|
-
```ts
|
|
683
|
-
share(id: string, request: { link?: boolean; emails?: string[] }): Promise<JobShares>
|
|
684
|
-
```
|
|
685
|
-
|
|
686
|
-
```ts
|
|
687
|
-
const state = await jobs().share(job.id, { link: true, emails: ["alice@example.org"] });
|
|
688
|
-
console.log(state.link.url);
|
|
689
|
-
```
|
|
690
|
-
</Tab>
|
|
691
|
-
<Tab title="Python">
|
|
692
|
-
```python
|
|
693
|
-
async def share(id: str, *, link: bool = False, emails: list[str] | None = None) -> JobShares
|
|
694
|
-
```
|
|
695
|
-
|
|
696
|
-
```python
|
|
697
|
-
state = await jobs().share(job.id, link=True, emails=["alice@example.org"])
|
|
698
|
-
print(state.link.url)
|
|
699
|
-
```
|
|
700
|
-
</Tab>
|
|
701
|
-
</Tabs>
|
|
702
|
-
|
|
703
|
-
## unshare
|
|
704
|
-
|
|
705
|
-
Take a share back, with the same arguments as `share`. `link: true` turns the link off at once (a later `share` returns a new one); `emails` removes those addresses. Safe to repeat.
|
|
706
|
-
|
|
707
|
-
<Tabs>
|
|
708
|
-
<Tab title="TypeScript">
|
|
709
|
-
```ts
|
|
710
|
-
unshare(id: string, request: { link?: boolean; emails?: string[] }): Promise<JobShares>
|
|
711
|
-
```
|
|
712
|
-
|
|
713
|
-
```ts
|
|
714
|
-
await jobs().unshare(job.id, { link: true });
|
|
715
|
-
```
|
|
716
|
-
</Tab>
|
|
717
|
-
<Tab title="Python">
|
|
718
|
-
```python
|
|
719
|
-
async def unshare(id: str, *, link: bool = False, emails: list[str] | None = None) -> JobShares
|
|
720
|
-
```
|
|
721
|
-
|
|
722
|
-
```python
|
|
723
|
-
await jobs().unshare(job.id, link=True)
|
|
724
|
-
```
|
|
725
|
-
</Tab>
|
|
726
|
-
</Tabs>
|
|
727
|
-
|
|
728
|
-
## shares
|
|
729
|
-
|
|
730
|
-
Who the job is shared with: `visibility` (`PRIVATE` or `LINK`), `link` (`enabled`, and `url` while it is on), and `emails` (each with `email`, `shared_by` and `created_at`). Creator only.
|
|
731
|
-
|
|
732
|
-
<Tabs>
|
|
733
|
-
<Tab title="TypeScript">
|
|
734
|
-
```ts
|
|
735
|
-
shares(id: string): Promise<JobShares>
|
|
736
|
-
```
|
|
737
|
-
|
|
738
|
-
```ts
|
|
739
|
-
const { link, emails } = await jobs().shares(job.id);
|
|
740
|
-
```
|
|
741
|
-
</Tab>
|
|
742
|
-
<Tab title="Python">
|
|
743
|
-
```python
|
|
744
|
-
async def shares(id: str) -> JobShares
|
|
745
|
-
```
|
|
746
|
-
|
|
747
|
-
```python
|
|
748
|
-
state = await jobs().shares(job.id)
|
|
749
|
-
```
|
|
750
|
-
</Tab>
|
|
751
|
-
</Tabs>
|
|
752
|
-
|
|
753
|
-
## grep
|
|
754
|
-
|
|
755
|
-
Search every trial's parsed trace in one pass. `q` is a case-insensitive regex over each event's type and content; a plain string is a plain substring. Items are per-trial groups with the exact `match_count` and the first five matching events, ordered by trial id; `limit` defaults to 50, at most 200. Keep paging while `hasMore` (`has_more` in Python) is true; a pattern too expensive to evaluate is refused with `invalid_input`.
|
|
756
|
-
|
|
757
|
-
<Tabs>
|
|
758
|
-
<Tab title="TypeScript">
|
|
759
|
-
```ts
|
|
760
|
-
grep(
|
|
761
|
-
id: string,
|
|
762
|
-
q: string,
|
|
763
|
-
options?: { type?: string; limit?: number; cursor?: string },
|
|
764
|
-
): Promise<JobGrepPage>
|
|
765
|
-
```
|
|
766
|
-
|
|
767
|
-
```ts
|
|
768
|
-
const hits = await jobs().grep(job.id, "permission denied");
|
|
769
|
-
```
|
|
770
|
-
</Tab>
|
|
771
|
-
<Tab title="Python">
|
|
772
|
-
```python
|
|
773
|
-
async def grep(
|
|
774
|
-
id: str,
|
|
775
|
-
q: str,
|
|
776
|
-
*,
|
|
777
|
-
type: Optional[str] = None,
|
|
778
|
-
cursor: Optional[str] = None,
|
|
779
|
-
limit: Optional[int] = None,
|
|
780
|
-
) -> JobGrepPage
|
|
781
|
-
```
|
|
782
|
-
|
|
783
|
-
```python
|
|
784
|
-
hits = await jobs().grep(job.id, "permission denied")
|
|
785
|
-
```
|
|
786
|
-
</Tab>
|
|
787
|
-
</Tabs>
|
|
788
|
-
|
|
789
|
-
## passAtK
|
|
790
|
-
|
|
791
|
-
<Tabs>
|
|
792
|
-
<Tab title="TypeScript">
|
|
793
|
-
```ts
|
|
794
|
-
import { passAtK } from "@evolvingmachines/evolve";
|
|
795
|
-
|
|
796
|
-
function passAtK(job: Job): { evals_key: string; points: { k: number; value: number }[] }[]
|
|
797
|
-
```
|
|
798
|
-
|
|
799
|
-
Reads `stats.evals[key].pass_at_k` off a job you already hold, as sorted numbers; no request is made. Groups that cannot answer are left out, so an empty array means the job has no pass@k to show.
|
|
800
|
-
|
|
801
|
-
```ts
|
|
802
|
-
for (const group of passAtK(job)) {
|
|
803
|
-
for (const point of group.points) console.log(group.evals_key, `pass@${point.k}`, point.value.toFixed(3));
|
|
804
|
-
}
|
|
805
|
-
```
|
|
806
|
-
</Tab>
|
|
807
|
-
<Tab title="Python">
|
|
808
|
-
```python
|
|
809
|
-
from evolve import pass_at_k
|
|
810
|
-
|
|
811
|
-
def pass_at_k(job: Job) -> List[PassAtKGroup]
|
|
812
|
-
```
|
|
813
|
-
|
|
814
|
-
Reads `stats["evals"][key]["pass_at_k"]` off a job you already hold, as sorted `PassAtKGroup(evals_key, points)` with `PassAtKPoint(k, value)`; no request is made. Groups that cannot answer are left out, so an empty list means the job has no pass@k to show.
|
|
815
|
-
|
|
816
|
-
```python
|
|
817
|
-
for group in pass_at_k(job):
|
|
818
|
-
for point in group.points:
|
|
819
|
-
print(group.evals_key, f"pass@{point.k}", f"{point.value:.3f}")
|
|
820
|
-
```
|
|
821
|
-
</Tab>
|
|
822
|
-
</Tabs>
|