verifiers 0.3.2.dev88__py3-none-any.whl → 0.3.2.dev89__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/harness.py CHANGED
@@ -1,5 +1,6 @@
1
1
  from __future__ import annotations
2
2
 
3
+ import asyncio
3
4
  import logging
4
5
  import os
5
6
  from abc import ABC, abstractmethod
@@ -99,23 +100,32 @@ class Harness(ABC, Generic[ConfigT]):
99
100
  """Upload each `config.skills` folder into `runtime` at `dest/<folder name>` —
100
101
  the program's fixed skill discovery location, which a supporting harness's
101
102
  `setup` passes."""
103
+ uploads = []
104
+ executables = []
102
105
  for skill in self.config.skills:
103
106
  # Resolve so `.`/`..` entries get their real folder name (and can't
104
107
  # place files outside `dest`).
105
108
  skill = skill.resolve()
106
109
  if not skill.is_dir():
107
110
  raise ValueError(f"skill {str(skill)!r} is not a folder")
108
- executables = []
109
- for file in sorted(skill.rglob("*")):
111
+ for file in skill.rglob("*"):
110
112
  if not file.is_file():
111
113
  continue
112
114
  target = f"{dest}/{skill.name}/{file.relative_to(skill).as_posix()}"
113
- await runtime.write(target, file.read_bytes())
115
+ uploads.append((target, file.read_bytes()))
114
116
  if os.access(file, os.X_OK):
115
117
  executables.append(target)
116
- if executables:
117
- # `write` moves bytes, not modes; restore the execute bits scripts need.
118
- await runtime.run(["chmod", "+x", *executables], {})
118
+ # Settle every upload before returning or surfacing an error.
119
+ results = await asyncio.gather(
120
+ *(runtime.write(target, data) for target, data in uploads),
121
+ return_exceptions=True,
122
+ )
123
+ for result in results:
124
+ if isinstance(result, BaseException):
125
+ raise result
126
+ if executables:
127
+ # `write` moves bytes, not modes; restore the execute bits scripts need.
128
+ await runtime.run(["chmod", "+x", *executables], {})
119
129
 
120
130
  async def _check_result(
121
131
  self, trace: Trace, runtime: Runtime, result: ProgramResult
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: verifiers
3
- Version: 0.3.2.dev88
3
+ Version: 0.3.2.dev89
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
@@ -6,7 +6,7 @@ verifiers/v1/env.py,sha256=CEhzjojhg5jqbOYruUnc5U7TtgDHDSx8NiiFA0qfbt8,18234
6
6
  verifiers/v1/episode.py,sha256=Fft0R2W6INAVeJhoE9b8h7L_KQSz7XuxP4FT_XhcsUY,5741
7
7
  verifiers/v1/errors.py,sha256=uQySmCUrjDYFkBIii1vBFPiEcPFPQZ9EGpas_6HvcQI,5279
8
8
  verifiers/v1/graph.py,sha256=K6wKkoT_8TpNqPQISu2Xf0eHtAYW_KUGw0CteN5zr3c,36529
9
- verifiers/v1/harness.py,sha256=Yx-XCIs1HAmqv1F-nhCTDBUwAx51xQWNWgFcWL1WRTM,13777
9
+ verifiers/v1/harness.py,sha256=sXEjVdrS4A2SO35C_uEebBVeUt8VL7dui7IneAp2MRs,14124
10
10
  verifiers/v1/judge.py,sha256=uqn-djkK2_7Q3kOjkDo6ipOvV_HOvuLa9y6AoDjRux8,9618
11
11
  verifiers/v1/rollout.py,sha256=SvMgs7YBNjiftp4vlGVBMEseUsJs1h7qrqAlxmWaNwY,23987
12
12
  verifiers/v1/semantic.py,sha256=VQ_buw6Ya6QtRoh_fiYI5Avs5RmIQCfWH0H0bQc4aoc,4704
@@ -190,8 +190,8 @@ verifiers/v1/utils/prime.py,sha256=UTYRjp9cbjNb6CVmBHda-1wWZAIIfxNOmTyNuT7_wL4,9
190
190
  verifiers/v1/utils/retries.py,sha256=Y2ZgrAjn-qNkRKZP_RVNL_7EK0iaRcZeCa404lpGYi4,5417
191
191
  verifiers/v1/utils/score.py,sha256=493yJVMw8teCu9JxapxMFPFzI0hNUqdo0Y2nGW4kckk,6200
192
192
  verifiers/v1/utils/version.py,sha256=-obEo_-l9-D8FLef4hYxncOe-uJpxrM1g2Hig_37Sgs,1607
193
- verifiers-0.3.2.dev88.dist-info/METADATA,sha256=byIq72DL9noEFv_E1iYum40wY1yX-fgG1zNV6pxkh1c,4237
194
- verifiers-0.3.2.dev88.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
195
- verifiers-0.3.2.dev88.dist-info/entry_points.txt,sha256=uqQje0TMsr7k6nXlWxlPs13Si0evb3pVCEDF6c-YL80,241
196
- verifiers-0.3.2.dev88.dist-info/licenses/LICENSE,sha256=v0RrUsdV3IDoZhrRce297IXS3xMHNJ-_LdLpFAUWb9k,1072
197
- verifiers-0.3.2.dev88.dist-info/RECORD,,
193
+ verifiers-0.3.2.dev89.dist-info/METADATA,sha256=DY9UBh4G2UWBWU0GlGCI40TJ5AkQPxHrwW0J1dJH8kc,4237
194
+ verifiers-0.3.2.dev89.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
195
+ verifiers-0.3.2.dev89.dist-info/entry_points.txt,sha256=uqQje0TMsr7k6nXlWxlPs13Si0evb3pVCEDF6c-YL80,241
196
+ verifiers-0.3.2.dev89.dist-info/licenses/LICENSE,sha256=v0RrUsdV3IDoZhrRce297IXS3xMHNJ-_LdLpFAUWb9k,1072
197
+ verifiers-0.3.2.dev89.dist-info/RECORD,,