verifiers 0.4.2.dev7__py3-none-any.whl → 0.4.2.dev8__py3-none-any.whl

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.
verifiers/v1/rollout.py CHANGED
@@ -65,18 +65,20 @@ class RolloutTimeouts:
65
65
 
66
66
  _HOME_PROBE = (
67
67
  "home=$(awk -F: -v u=\"$1\" '$1 == u { print $6 }' /etc/passwd); "
68
- 'echo "$home"; test -n "$home" && test -d "$home"'
68
+ 'test -n "$home" || exit 1; home=${2:-$home}; echo "$home"; test -d "$home"'
69
69
  )
70
70
 
71
71
 
72
- async def resolve_agent_runtime(runtime: Runtime, user: str | None) -> Runtime:
72
+ async def resolve_agent_runtime(
73
+ runtime: Runtime, user: str | None, home: str | None = None
74
+ ) -> Runtime:
73
75
  """The runtime the harness runs through: `runtime` itself, or a view running as `user`
74
- with `HOME` set to its home. `user` must exist with a home directory it can write
76
+ with `HOME` set to `home` or its passwd home. `user` must exist with a home it can write
75
77
  (task authors ship it in the image), and the view must really run as it, so a
76
78
  runtime ignoring the user never runs the agent as root."""
77
79
  if user is None:
78
80
  return runtime
79
- lookup = await runtime.run(["sh", "-c", _HOME_PROBE, "sh", user], {})
81
+ lookup = await runtime.run(["sh", "-c", _HOME_PROBE, "sh", user, home or ""], {})
80
82
  home = lookup.stdout.strip()
81
83
  if not home:
82
84
  raise TaskError(f"agent_user {user!r} does not exist in the image")
@@ -356,7 +358,7 @@ class Rollout:
356
358
  boundary(HarnessError, "harness setup"),
357
359
  ):
358
360
  self._agent_runtime = await resolve_agent_runtime(
359
- runtime, self.task.data.agent_user
361
+ runtime, self.task.data.agent_user, self.task.data.agent_home
360
362
  )
361
363
  await self.harness.setup(self._agent_runtime)
362
364
  # `base_url` is the interception server's reachable URL for this rollout.
verifiers/v1/task.py CHANGED
@@ -109,7 +109,10 @@ class TaskData(BaseModel):
109
109
  agent_user: str | None = None
110
110
  """Existing user in the task's box that the harness, and so every command the agent
111
111
  runs, executes as. None uses the runtime's default user (usually root). Task setup,
112
- harness setup, artifact collection, and grading keep running as the default user."""
112
+ artifact collection, and grading keep running as the default user."""
113
+ agent_home: str | None = None
114
+ """Home directory for `agent_user`; None uses the account's passwd home.
115
+ Must already exist and be writable by that user."""
113
116
 
114
117
  skills: list[SkillSource] = Field(default_factory=list)
115
118
  """Skill sources installed before the harness's configured skills for this task."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: verifiers
3
- Version: 0.4.2.dev7
3
+ Version: 0.4.2.dev8
4
4
  Summary: Verifiers: Environments for LLM Reinforcement Learning
5
5
  Project-URL: Homepage, https://github.com/primeintellect-ai/verifiers
6
6
  Project-URL: Documentation, https://github.com/primeintellect-ai/verifiers
@@ -8,11 +8,11 @@ verifiers/v1/grading.py,sha256=Z8J9-UiQA_P8MOMn1CAGsD_SgmrQd6-H_VPmD27ezss,9685
8
8
  verifiers/v1/graph.py,sha256=wsVUZmCSfu6FuEwEI1cDrroABFbBRnJX9yNVdNOi45A,48126
9
9
  verifiers/v1/harness.py,sha256=Hvul6cbb9uWQl4GmHubvcRHqKdfeCY3n44r_ga0csfI,16806
10
10
  verifiers/v1/judge.py,sha256=T-TyYVcLGIoyUADYKy_pCBj2CTLhERlct5pmmWqPpTA,10507
11
- verifiers/v1/rollout.py,sha256=icIjp62QKkImVyJ-ypmNh1Jj2qdpKWAZ6ZDrmg54ev8,46206
11
+ verifiers/v1/rollout.py,sha256=5EQO1XVEpw1s6W0o2pnl3h--3sLyUDZPKUFEaue0Q9g,46309
12
12
  verifiers/v1/semantic.py,sha256=nqKPPUoPL5Oh8Es_XjtcbDiQiIMKTYayXEm-EPB-jAE,5129
13
13
  verifiers/v1/session.py,sha256=fuw4eEVxTw_KlkSspxbgejEhmSXJYjX7bUquq2LJ_CU,29640
14
14
  verifiers/v1/state.py,sha256=EckF2bWp-vV4b1jYJ9sLI5xrfGuI5spIgYYwW926toI,595
15
- verifiers/v1/task.py,sha256=emEKiNthgFKyJA3k-omloxSnFGbRR7cXkTiKXJh_3U4,15529
15
+ verifiers/v1/task.py,sha256=gr-Szu0744nn_A0fQUGxm5MwnwqgtOQhuGktRCJhFF8,15681
16
16
  verifiers/v1/taskset.py,sha256=LE_3ogL7itU2Amk-N20cHkZ7Ev6MznJ0HpC8B1xb4w0,9482
17
17
  verifiers/v1/trace.py,sha256=4OC13ee0oBWkBDQzZ2GIGBpUwgMD3LkpPv-jfsf4Ycc,40767
18
18
  verifiers/v1/types.py,sha256=mEy4C9Hl3fK9091kxqalqbVZNRnSI5A0npRHchpsFsM,14800
@@ -189,8 +189,8 @@ verifiers/v1/utils/scope.py,sha256=ivYGJ8GhzyRKbP4L48VsUDWFxpmFsjeaE_7KYBKJ_c0,8
189
189
  verifiers/v1/utils/score.py,sha256=493yJVMw8teCu9JxapxMFPFzI0hNUqdo0Y2nGW4kckk,6200
190
190
  verifiers/v1/utils/trace_store.py,sha256=Qo9qvsJAl8PoRUavjQAfUB2VNxmUtYQtU2ejLKPzY9c,3382
191
191
  verifiers/v1/utils/version.py,sha256=-obEo_-l9-D8FLef4hYxncOe-uJpxrM1g2Hig_37Sgs,1607
192
- verifiers-0.4.2.dev7.dist-info/METADATA,sha256=cuv0RX3ox-W-mK7fZZzvd7KKrbeAVbk9RtFnFlCsiJw,5136
193
- verifiers-0.4.2.dev7.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
194
- verifiers-0.4.2.dev7.dist-info/entry_points.txt,sha256=3M8Wr0w1cUKiB-fJ6YHB6eK5WuKYg-Y3OC4wCuUje_c,174
195
- verifiers-0.4.2.dev7.dist-info/licenses/LICENSE,sha256=v0RrUsdV3IDoZhrRce297IXS3xMHNJ-_LdLpFAUWb9k,1072
196
- verifiers-0.4.2.dev7.dist-info/RECORD,,
192
+ verifiers-0.4.2.dev8.dist-info/METADATA,sha256=oAtU8QjReipdiWZkxl0QBAS7pcllsKRmRgGkSnVmi_M,5136
193
+ verifiers-0.4.2.dev8.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
194
+ verifiers-0.4.2.dev8.dist-info/entry_points.txt,sha256=3M8Wr0w1cUKiB-fJ6YHB6eK5WuKYg-Y3OC4wCuUje_c,174
195
+ verifiers-0.4.2.dev8.dist-info/licenses/LICENSE,sha256=v0RrUsdV3IDoZhrRce297IXS3xMHNJ-_LdLpFAUWb9k,1072
196
+ verifiers-0.4.2.dev8.dist-info/RECORD,,