swarmauri_evaluator_subprocess 0.3.0.dev48__tar.gz → 0.11.0__tar.gz
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.
- swarmauri_evaluator_subprocess-0.11.0/NOTICE +7 -0
- swarmauri_evaluator_subprocess-0.11.0/PKG-INFO +502 -0
- swarmauri_evaluator_subprocess-0.11.0/README.md +472 -0
- {swarmauri_evaluator_subprocess-0.3.0.dev48 → swarmauri_evaluator_subprocess-0.11.0}/pyproject.toml +59 -8
- {swarmauri_evaluator_subprocess-0.3.0.dev48 → swarmauri_evaluator_subprocess-0.11.0}/swarmauri_evaluator_subprocess/SubprocessEvaluator.py +62 -23
- swarmauri_evaluator_subprocess-0.3.0.dev48/PKG-INFO +0 -181
- swarmauri_evaluator_subprocess-0.3.0.dev48/README.md +0 -154
- {swarmauri_evaluator_subprocess-0.3.0.dev48 → swarmauri_evaluator_subprocess-0.11.0}/LICENSE +0 -0
- {swarmauri_evaluator_subprocess-0.3.0.dev48 → swarmauri_evaluator_subprocess-0.11.0}/swarmauri_evaluator_subprocess/__init__.py +0 -0
|
@@ -0,0 +1,502 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: swarmauri_evaluator_subprocess
|
|
3
|
+
Version: 0.11.0
|
|
4
|
+
Summary: A subprocess-based evaluator for executing and measuring program performance in isolated subprocesses
|
|
5
|
+
License-Expression: Apache-2.0
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
License-File: NOTICE
|
|
8
|
+
Keywords: subprocess,evaluation,sandboxing,program execution,resource limits,performance measurement,testing,security,swarm,ai,swarmauri,sdk,standards,evaluator
|
|
9
|
+
Author: Jacob Stewart
|
|
10
|
+
Author-email: jacob@swarmauri.com
|
|
11
|
+
Requires-Python: >=3.10,<3.15
|
|
12
|
+
Classifier: Natural Language :: English
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
16
|
+
Classifier: Topic :: Software Development :: Testing
|
|
17
|
+
Classifier: Topic :: System :: Monitoring
|
|
18
|
+
Classifier: Programming Language :: Python
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
26
|
+
Requires-Dist: swarmauri_base
|
|
27
|
+
Requires-Dist: swarmauri_core
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
|
|
30
|
+
# swarmauri_evaluator_subprocess
|
|
31
|
+
|
|
32
|
+
<!-- readme-standards:begin branding -->
|
|
33
|
+
<p align="center"><a href="https://github.com/swarmauri/swarmauri-sdk"><img src="https://raw.githubusercontent.com/swarmauri/swarmauri-sdk/master/assets/swarmauri.brand.theme.svg" alt="Swarmauri SDK" width="300"></a></p>
|
|
34
|
+
<p align="center"><strong>swarmauri_evaluator_subprocess</strong></p>
|
|
35
|
+
<p align="center">A subprocess-based evaluator for executing and measuring program performance in isolated subprocesses</p>
|
|
36
|
+
<p align="center">
|
|
37
|
+
<a href="https://pypi.org/project/swarmauri_evaluator_subprocess/"><img alt="pypi: swarmauri_evaluator_subprocess" src="https://img.shields.io/pypi/v/swarmauri_evaluator_subprocess?labelColor=1E293B&color=1D4ED8"></a>
|
|
38
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_evaluator_subprocess/pyproject.toml"><img alt="Source version: 0.11.0" src="https://img.shields.io/static/v1?label=Source%20version&message=0.11.0&labelColor=1E293B&color=4338CA"></a>
|
|
39
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_evaluator_subprocess/pyproject.toml"><img alt="Python: >=3.10,<3.15" src="https://img.shields.io/static/v1?label=Python&message=%3E%3D3.10%2C%3C3.15&labelColor=1E293B&color=0F766E"></a>
|
|
40
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_evaluator_subprocess/pyproject.toml"><img alt="Layer: standards" src="https://img.shields.io/static/v1?label=Layer&message=standards&labelColor=1E293B&color=6D28D9"></a>
|
|
41
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_evaluator_subprocess/README.md#lifecycle-and-migration"><img alt="Lifecycle: active" src="https://img.shields.io/static/v1?label=Lifecycle&message=active&labelColor=1E293B&color=166534"></a>
|
|
42
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_evaluator_subprocess/LICENSE"><img alt="License: Apache-2.0" src="https://img.shields.io/static/v1?label=License&message=Apache-2.0&labelColor=1E293B&color=86198F"></a>
|
|
43
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_evaluator_subprocess/NOTICE"><img alt="Notice: attribution" src="https://img.shields.io/static/v1?label=Notice&message=attribution&labelColor=1E293B&color=86198F"></a>
|
|
44
|
+
</p>
|
|
45
|
+
<p align="center">
|
|
46
|
+
<a href="https://pypi.org/project/swarmauri_evaluator_subprocess/"><img alt="Monthly PyPI downloads: swarmauri_evaluator_subprocess" src="https://img.shields.io/pypi/dm/swarmauri_evaluator_subprocess?labelColor=1E293B&color=0E7490"></a>
|
|
47
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_evaluator_subprocess/README.md"><img alt="README hits: swarmauri_evaluator_subprocess" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/pkgs/40-standards/swarmauri_evaluator_subprocess/README.md.svg?label=README%20hits&labelColor=1E293B&color=0E7490"></a>
|
|
48
|
+
</p>
|
|
49
|
+
<p align="center">
|
|
50
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml"><img alt="README standards: CI gate" src="https://img.shields.io/static/v1?label=README%20standards&message=CI%20gate&labelColor=1E293B&color=1D4ED8"></a>
|
|
51
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_evaluator_subprocess/tests/unit/test_readme_sources.py"><img alt="Tests: example source" src="https://img.shields.io/static/v1?label=Tests&message=example%20source&labelColor=1E293B&color=0F766E"></a>
|
|
52
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_evaluator_subprocess/README.md#certification-status"><img alt="Certification: not certified" src="https://img.shields.io/static/v1?label=Certification&message=not%20certified&labelColor=1E293B&color=92400E"></a>
|
|
53
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/tools/readme/POLICY.md"><img alt="Governance: repository policy" src="https://img.shields.io/static/v1?label=Governance&message=repository%20policy&labelColor=1E293B&color=4338CA"></a>
|
|
54
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml"><img alt="Evidence: source and CI" src="https://img.shields.io/static/v1?label=Evidence&message=source%20and%20CI&labelColor=1E293B&color=6D28D9"></a>
|
|
55
|
+
</p>
|
|
56
|
+
<p align="center"><a href="#overview">Overview</a> · <a href="#installation">Installation</a> · <a href="#quick-start">Quick Start</a> · <a href="#usage">Usage</a> · <a href="#public-api-and-import-surfaces">API</a> · <a href="#contributing">Contributing</a> · <a href="#governance">Governance</a> · <a href="#license">License</a></p>
|
|
57
|
+
<!-- readme-standards:end branding -->
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Overview
|
|
62
|
+
|
|
63
|
+
### Summary
|
|
64
|
+
|
|
65
|
+
`SubprocessEvaluator` executes programs inside sandboxed subprocesses while
|
|
66
|
+
enforcing CPU, memory, and file size quotas. It captures stdout/stderr, tracks
|
|
67
|
+
exit codes, and returns a normalized score plus structured metadata describing
|
|
68
|
+
each run.
|
|
69
|
+
|
|
70
|
+
### Why This Package
|
|
71
|
+
|
|
72
|
+
`swarmauri_evaluator_subprocess` isolates this responsibility: A subprocess-based evaluator for executing and measuring program performance in isolated subprocesses. Its [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_evaluator_subprocess/swarmauri_evaluator_subprocess/__init__.py) exposes `SubprocessEvaluator`, allowing consumers to select this package without treating adjacent packages as part of its public contract.
|
|
73
|
+
|
|
74
|
+
### When to Use
|
|
75
|
+
|
|
76
|
+
Choose `swarmauri_evaluator_subprocess` when your integration needs a subprocess-based evaluator for executing and measuring program performance in isolated subprocesses. Match the imports below to your application boundary and install its declared dependencies before using the example.
|
|
77
|
+
|
|
78
|
+
### Features
|
|
79
|
+
|
|
80
|
+
- Apply CPU timeouts, memory ceilings, file size limits, and process count caps
|
|
81
|
+
before user code starts (`resource.setrlimit`).
|
|
82
|
+
- Automatically choose the appropriate command: launch executables directly or
|
|
83
|
+
wrap Python and shell scripts with the correct interpreter.
|
|
84
|
+
- Compare stdout against an `expected_output` string and annotate mismatches in
|
|
85
|
+
the result metadata.
|
|
86
|
+
- Record execution context (`command`, `args`, `working_dir`) alongside
|
|
87
|
+
collected streams for easy debugging.
|
|
88
|
+
- Aggregate multiple runs with reason counts, timeout rates, and success rates
|
|
89
|
+
via `aggregate_scores`.
|
|
90
|
+
|
|
91
|
+
### Non-Goals
|
|
92
|
+
|
|
93
|
+
`swarmauri_evaluator_subprocess` owns a subprocess-based evaluator for executing and measuring program performance in isolated subprocesses. Its imports do not by themselves configure credentials, deploy a service, or certify the behavior of its consumers. Dependencies and neighboring packages retain their own documented responsibilities.
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Getting Started
|
|
98
|
+
|
|
99
|
+
### Prerequisites
|
|
100
|
+
|
|
101
|
+
Python `>=3.10,<3.15` is required. The [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_evaluator_subprocess/pyproject.toml) declares runtime dependencies including `swarmauri-core`, `swarmauri-base`. Read the example’s inputs and service requirements before execution.
|
|
102
|
+
|
|
103
|
+
### Installation
|
|
104
|
+
|
|
105
|
+
Pick the tool that matches your workflow:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
# pip
|
|
109
|
+
pip install swarmauri_evaluator_subprocess
|
|
110
|
+
|
|
111
|
+
# Poetry
|
|
112
|
+
poetry add swarmauri_evaluator_subprocess
|
|
113
|
+
|
|
114
|
+
# uv
|
|
115
|
+
uv add swarmauri_evaluator_subprocess
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
#### uv
|
|
119
|
+
|
|
120
|
+
<!-- readme-standards:begin installation.uv -->
|
|
121
|
+
```bash
|
|
122
|
+
uv add swarmauri_evaluator_subprocess
|
|
123
|
+
```
|
|
124
|
+
<!-- readme-standards:end installation.uv -->
|
|
125
|
+
|
|
126
|
+
#### pip
|
|
127
|
+
|
|
128
|
+
<!-- readme-standards:begin installation.pip -->
|
|
129
|
+
```bash
|
|
130
|
+
python -m pip install swarmauri_evaluator_subprocess
|
|
131
|
+
```
|
|
132
|
+
<!-- readme-standards:end installation.pip -->
|
|
133
|
+
|
|
134
|
+
#### Poetry
|
|
135
|
+
|
|
136
|
+
<!-- readme-standards:begin installation.poetry -->
|
|
137
|
+
```bash
|
|
138
|
+
poetry add swarmauri_evaluator_subprocess
|
|
139
|
+
```
|
|
140
|
+
<!-- readme-standards:end installation.poetry -->
|
|
141
|
+
|
|
142
|
+
### Quick Start
|
|
143
|
+
|
|
144
|
+
The example below writes a temporary Python script to disk, wraps it in a small
|
|
145
|
+
`IProgram` implementation, and evaluates it inside a subprocess. The evaluator
|
|
146
|
+
returns `1.0` when the exit code is in `success_exit_codes` and, when provided,
|
|
147
|
+
stdout matches `expected_output`.
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
**Evaluation options**
|
|
151
|
+
|
|
152
|
+
`SubprocessEvaluator.evaluate(program, **kwargs)` accepts runtime controls in
|
|
153
|
+
addition to the evaluator's model fields:
|
|
154
|
+
|
|
155
|
+
| Argument | Description |
|
|
156
|
+
| ---------------- | ----------- |
|
|
157
|
+
| `args` | List of command-line arguments appended to the prepared command. |
|
|
158
|
+
| `input_data` | String provided on stdin; useful for feeding sample input. |
|
|
159
|
+
| `expected_output`| Optional stdout string; mismatches lower the score to `0.7`. |
|
|
160
|
+
| `timeout` | Overrides the evaluator's `timeout` for a single run. |
|
|
161
|
+
|
|
162
|
+
**Returned metadata**
|
|
163
|
+
|
|
164
|
+
Each evaluation returns `(score, metadata)` where `metadata` always contains:
|
|
165
|
+
|
|
166
|
+
- `stdout`, `stderr`, and `exit_code` from the subprocess.
|
|
167
|
+
- `timed_out` flag plus a human-readable `reason` such as `success`,
|
|
168
|
+
`timeout`, or `exit_code_<value>`.
|
|
169
|
+
- `command`, `args`, and `working_dir` to show how the program was launched.
|
|
170
|
+
- `execution_time` (seconds) measured by the evaluator wrapper.
|
|
171
|
+
|
|
172
|
+
When aggregating multiple runs, `aggregate_scores` adds `reason_counts`,
|
|
173
|
+
`timeout_rate`, `success_rate`, and `total_executions` to the combined
|
|
174
|
+
metadata so callers can evaluate fleet-wide behavior.
|
|
175
|
+
|
|
176
|
+
#### Example
|
|
177
|
+
|
|
178
|
+
<!-- readme-standards:begin example.quick-start -->
|
|
179
|
+
Source: [docs/readme/quick_start.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_evaluator_subprocess/docs/readme/quick_start.py).
|
|
180
|
+
|
|
181
|
+
```python
|
|
182
|
+
from pathlib import Path
|
|
183
|
+
import tempfile
|
|
184
|
+
|
|
185
|
+
from swarmauri_evaluator_subprocess import SubprocessEvaluator
|
|
186
|
+
from swarmauri_core.programs.IProgram import DiffType, IProgram
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
class ScriptProgram(IProgram):
|
|
190
|
+
"""Minimal IProgram wrapper for a script stored on disk."""
|
|
191
|
+
|
|
192
|
+
def __init__(self, path: Path):
|
|
193
|
+
self._path = Path(path)
|
|
194
|
+
|
|
195
|
+
# Required IProgram interface methods -------------------------------
|
|
196
|
+
def diff(self, other: IProgram) -> DiffType: # pragma: no cover - example
|
|
197
|
+
return {}
|
|
198
|
+
|
|
199
|
+
def apply_diff(
|
|
200
|
+
self, diff: DiffType
|
|
201
|
+
) -> "ScriptProgram": # pragma: no cover
|
|
202
|
+
return ScriptProgram(self._path)
|
|
203
|
+
|
|
204
|
+
def validate(self) -> bool: # pragma: no cover
|
|
205
|
+
return self._path.exists()
|
|
206
|
+
|
|
207
|
+
def clone(self) -> "ScriptProgram": # pragma: no cover
|
|
208
|
+
return ScriptProgram(self._path)
|
|
209
|
+
|
|
210
|
+
# Methods consumed by SubprocessEvaluator ---------------------------
|
|
211
|
+
def get_path(self) -> str:
|
|
212
|
+
return str(self._path)
|
|
213
|
+
|
|
214
|
+
def is_executable(self) -> bool:
|
|
215
|
+
return False
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
def run_example(expected_output: str = "hello from subprocess\n"):
|
|
219
|
+
evaluator = SubprocessEvaluator(timeout=5)
|
|
220
|
+
|
|
221
|
+
with tempfile.TemporaryDirectory() as tmpdir:
|
|
222
|
+
script_path = Path(tmpdir) / "echo.py"
|
|
223
|
+
script_path.write_text(
|
|
224
|
+
"print('hello from subprocess')\n", encoding="utf-8"
|
|
225
|
+
)
|
|
226
|
+
|
|
227
|
+
program = ScriptProgram(script_path)
|
|
228
|
+
|
|
229
|
+
score, metadata = evaluator.evaluate(
|
|
230
|
+
program,
|
|
231
|
+
expected_output=expected_output,
|
|
232
|
+
)
|
|
233
|
+
|
|
234
|
+
return score, metadata
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
def main():
|
|
238
|
+
score, metadata = run_example()
|
|
239
|
+
print("Score:", score)
|
|
240
|
+
print("Stdout:", metadata["stdout"].strip())
|
|
241
|
+
print("Reason:", metadata["reason"])
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
if __name__ == "__main__":
|
|
245
|
+
main()
|
|
246
|
+
```
|
|
247
|
+
<!-- readme-standards:end example.quick-start -->
|
|
248
|
+
|
|
249
|
+
#### Expected Result
|
|
250
|
+
|
|
251
|
+
The example demonstrates the documented `swarmauri_evaluator_subprocess` source boundary or workflow. Complete its required configuration first. README CI checks the maintained source’s syntax and declarations; it does not claim that external services or the application workflow were exercised.
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
## Usage
|
|
256
|
+
|
|
257
|
+
### Common Workflows
|
|
258
|
+
|
|
259
|
+
<!-- readme-standards:begin example.usage -->
|
|
260
|
+
Source: [docs/readme/usage.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_evaluator_subprocess/docs/readme/usage.py).
|
|
261
|
+
|
|
262
|
+
```python
|
|
263
|
+
from pathlib import Path
|
|
264
|
+
import tempfile
|
|
265
|
+
|
|
266
|
+
from swarmauri_evaluator_subprocess import SubprocessEvaluator
|
|
267
|
+
from swarmauri_core.programs.IProgram import DiffType, IProgram
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
class ScriptProgram(IProgram):
|
|
271
|
+
"""Minimal IProgram wrapper for a script stored on disk."""
|
|
272
|
+
|
|
273
|
+
def __init__(self, path: Path):
|
|
274
|
+
self._path = Path(path)
|
|
275
|
+
|
|
276
|
+
# Required IProgram interface methods -------------------------------
|
|
277
|
+
def diff(self, other: IProgram) -> DiffType: # pragma: no cover - example
|
|
278
|
+
return {}
|
|
279
|
+
|
|
280
|
+
def apply_diff(
|
|
281
|
+
self, diff: DiffType
|
|
282
|
+
) -> "ScriptProgram": # pragma: no cover
|
|
283
|
+
return ScriptProgram(self._path)
|
|
284
|
+
|
|
285
|
+
def validate(self) -> bool: # pragma: no cover
|
|
286
|
+
return self._path.exists()
|
|
287
|
+
|
|
288
|
+
def clone(self) -> "ScriptProgram": # pragma: no cover
|
|
289
|
+
return ScriptProgram(self._path)
|
|
290
|
+
|
|
291
|
+
# Methods consumed by SubprocessEvaluator ---------------------------
|
|
292
|
+
def get_path(self) -> str:
|
|
293
|
+
return str(self._path)
|
|
294
|
+
|
|
295
|
+
def is_executable(self) -> bool:
|
|
296
|
+
return False
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
def run_example(expected_output: str = "hello from subprocess\n"):
|
|
300
|
+
evaluator = SubprocessEvaluator(timeout=5)
|
|
301
|
+
|
|
302
|
+
with tempfile.TemporaryDirectory() as tmpdir:
|
|
303
|
+
script_path = Path(tmpdir) / "echo.py"
|
|
304
|
+
script_path.write_text(
|
|
305
|
+
"print('hello from subprocess')\n", encoding="utf-8"
|
|
306
|
+
)
|
|
307
|
+
|
|
308
|
+
program = ScriptProgram(script_path)
|
|
309
|
+
|
|
310
|
+
score, metadata = evaluator.evaluate(
|
|
311
|
+
program,
|
|
312
|
+
expected_output=expected_output,
|
|
313
|
+
)
|
|
314
|
+
|
|
315
|
+
return score, metadata
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
def main():
|
|
319
|
+
score, metadata = run_example()
|
|
320
|
+
print("Score:", score)
|
|
321
|
+
print("Stdout:", metadata["stdout"].strip())
|
|
322
|
+
print("Reason:", metadata["reason"])
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
if __name__ == "__main__":
|
|
326
|
+
main()
|
|
327
|
+
```
|
|
328
|
+
<!-- readme-standards:end example.usage -->
|
|
329
|
+
|
|
330
|
+
### Configuration
|
|
331
|
+
|
|
332
|
+
Configure `swarmauri_evaluator_subprocess` through the APIs in [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_evaluator_subprocess/swarmauri_evaluator_subprocess/__init__.py); its [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_evaluator_subprocess/pyproject.toml) describes installation requirements, not an implicit service configuration. No additional package-global configuration contract is inferred from dependencies.
|
|
333
|
+
|
|
334
|
+
### Error Handling
|
|
335
|
+
|
|
336
|
+
The inspected `swarmauri_evaluator_subprocess` source raises `FileNotFoundError`, `ValueError`. Handle these at the calling boundary and consult the implementation for the triggering conditions.
|
|
337
|
+
|
|
338
|
+
### Best Practices
|
|
339
|
+
|
|
340
|
+
Use the explicit `swarmauri_evaluator_subprocess` imports documented below and keep collaborator configuration with the caller. Run the package’s relevant tests after changing `SubprocessEvaluator`; an import or successful installation alone does not establish its runtime guarantees.
|
|
341
|
+
|
|
342
|
+
---
|
|
343
|
+
|
|
344
|
+
## Package Boundary
|
|
345
|
+
|
|
346
|
+
### What It Owns
|
|
347
|
+
|
|
348
|
+
`swarmauri_evaluator_subprocess` is located in `standards` and owns a subprocess-based evaluator for executing and measuring program performance in isolated subprocesses. Source-declared APIs include `SubprocessEvaluator`. The [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_evaluator_subprocess/pyproject.toml) records its direct dependency boundary.
|
|
349
|
+
|
|
350
|
+
### Public API and Import Surfaces
|
|
351
|
+
|
|
352
|
+
Import namespace: `swarmauri_evaluator_subprocess`.
|
|
353
|
+
|
|
354
|
+
Source-declared exports or types: `SubprocessEvaluator`.
|
|
355
|
+
|
|
356
|
+
Inspect [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_evaluator_subprocess/swarmauri_evaluator_subprocess/__init__.py) for exact signatures; this inventory does not designate every internal module as stable.
|
|
357
|
+
|
|
358
|
+
### Entry Points
|
|
359
|
+
|
|
360
|
+
<!-- readme-standards:begin entry-points -->
|
|
361
|
+
- `swarmauri.evaluators` → `SubprocessEvaluator` → `swarmauri_evaluator_subprocess:SubprocessEvaluator`
|
|
362
|
+
<!-- readme-standards:end entry-points -->
|
|
363
|
+
|
|
364
|
+
### Injected Dependencies
|
|
365
|
+
|
|
366
|
+
The direct installation dependencies of `swarmauri_evaluator_subprocess` are `swarmauri-core`, `swarmauri-base`. These declarations do not imply automatic provider selection. Pass collaborators through the explicit constructors or call signatures in [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_evaluator_subprocess/swarmauri_evaluator_subprocess/__init__.py).
|
|
367
|
+
|
|
368
|
+
### Protocol Consumers
|
|
369
|
+
|
|
370
|
+
No direct package-manifest dependency on `swarmauri_evaluator_subprocess` was found in the audited three-repository inventory. External consumers may still use its documented imports or commands.
|
|
371
|
+
|
|
372
|
+
### Extensions
|
|
373
|
+
|
|
374
|
+
For `swarmauri_evaluator_subprocess`, use the source-declared public interfaces (`SubprocessEvaluator`) when composing or extending behavior. Its entry-point section below is authoritative for registered plugins; no additional extension loader is inferred from the package name.
|
|
375
|
+
|
|
376
|
+
---
|
|
377
|
+
|
|
378
|
+
## Operations and Readiness
|
|
379
|
+
|
|
380
|
+
### Operational Requirements
|
|
381
|
+
|
|
382
|
+
Operate `swarmauri_evaluator_subprocess` according to its actual entry points and collaborators. The dependency and Python requirements in the [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_evaluator_subprocess/pyproject.toml) are prerequisites; deployment topology, credentials, and readiness remain the responsibility of the consuming application unless explicitly documented above.
|
|
383
|
+
|
|
384
|
+
### Health and Observability
|
|
385
|
+
|
|
386
|
+
This README does not establish a standalone health endpoint for `swarmauri_evaluator_subprocess`. Observe the concrete caller’s results, exceptions, and existing test reports. An application that embeds this package must define its own health and telemetry contract.
|
|
387
|
+
|
|
388
|
+
### Security and Resource Limits
|
|
389
|
+
|
|
390
|
+
Apply the input, credential, and resource constraints implemented in [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_evaluator_subprocess/swarmauri_evaluator_subprocess/__init__.py). The `swarmauri_evaluator_subprocess` README gate is a documentation check, not a security review or a substitute for the implementation’s limits and caller authorization.
|
|
391
|
+
|
|
392
|
+
### Compatibility
|
|
393
|
+
|
|
394
|
+
This source version of `swarmauri_evaluator_subprocess` declares Python `>=3.10,<3.15`. Consult its dependency constraints before upgrading. Source-version and registry-version badges have separate meanings; this migration makes no additional platform or interoperability certification claim.
|
|
395
|
+
|
|
396
|
+
---
|
|
397
|
+
|
|
398
|
+
## Verification
|
|
399
|
+
|
|
400
|
+
### Tests
|
|
401
|
+
|
|
402
|
+
Run `python -m pytest tests/unit/test_readme_sources.py` from the `swarmauri_evaluator_subprocess` package directory for the maintained example source checks (Python compilation and non-Python file presence). Existing package tests include:
|
|
403
|
+
|
|
404
|
+
- [tests/example/test_readme_example.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_evaluator_subprocess/tests/example/test_readme_example.py)
|
|
405
|
+
- [tests/i9n/test_i9n__init__.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_evaluator_subprocess/tests/i9n/test_i9n__init__.py)
|
|
406
|
+
- [tests/unit/test_SubprocessEvaluator.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_evaluator_subprocess/tests/unit/test_SubprocessEvaluator.py)
|
|
407
|
+
|
|
408
|
+
The repository README gate also checks the required heading tree, metadata, managed fragments, and referenced files.
|
|
409
|
+
|
|
410
|
+
### Certification Status
|
|
411
|
+
|
|
412
|
+
No external certification is asserted for `swarmauri_evaluator_subprocess` by this documentation migration. README conformance, example syntax, runtime tests, and protocol or security certification are distinct evidence scopes.
|
|
413
|
+
|
|
414
|
+
### Evidence
|
|
415
|
+
|
|
416
|
+
The [README standards CI](https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml) records mechanical documentation results for its tested commit. The [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_evaluator_subprocess/swarmauri_evaluator_subprocess/__init__.py) and example sources support the package-boundary description; external runtime behavior requires its own test evidence.
|
|
417
|
+
|
|
418
|
+
---
|
|
419
|
+
|
|
420
|
+
## FAQ
|
|
421
|
+
|
|
422
|
+
### Why
|
|
423
|
+
|
|
424
|
+
**Why select this package?** `swarmauri_evaluator_subprocess` provides a subprocess-based evaluator for executing and measuring program performance in isolated subprocesses; use its own API boundary rather than assuming neighboring packages are bundled or configured automatically.
|
|
425
|
+
|
|
426
|
+
### How
|
|
427
|
+
|
|
428
|
+
**How do I start?** Install or synchronize the environment under Getting Started, follow the maintained example for `swarmauri_evaluator_subprocess`, and consult [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_evaluator_subprocess/swarmauri_evaluator_subprocess/__init__.py) for the exact types and signatures involved.
|
|
429
|
+
|
|
430
|
+
### When
|
|
431
|
+
|
|
432
|
+
**When should I validate an upgrade?** Recheck `swarmauri_evaluator_subprocess` whenever its source version, declared collaborators, configuration, or caller changes. Run relevant behavioral tests in addition to the README gate before promotion.
|
|
433
|
+
|
|
434
|
+
---
|
|
435
|
+
|
|
436
|
+
## Documentation and Related Packages
|
|
437
|
+
|
|
438
|
+
### More Documentation
|
|
439
|
+
|
|
440
|
+
The [repository contribution guide](https://github.com/swarmauri/swarmauri-sdk/blob/master/CONTRIBUTING.md), [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_evaluator_subprocess/swarmauri_evaluator_subprocess/__init__.py), and [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_evaluator_subprocess/pyproject.toml) provide the supporting context for `swarmauri_evaluator_subprocess`. The [README policy](https://github.com/groupsum/readme-standards/blob/master/docs/outline.md) defines the common document structure.
|
|
441
|
+
|
|
442
|
+
### Related Packages
|
|
443
|
+
|
|
444
|
+
- [swarmauri_base](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/20-bases/swarmauri_base/README.md): Reusable Swarmauri base classes, mixins, and dynamic Pydantic component models for composable intelligence infrastructure.
|
|
445
|
+
- [swarmauri_core](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/10-interfaces/swarmauri_core/README.md): Core interface contracts and shared types for Swarmauri composable intelligence infrastructure components.
|
|
446
|
+
|
|
447
|
+
### Project Links
|
|
448
|
+
|
|
449
|
+
<!-- readme-standards:begin project-links -->
|
|
450
|
+
- [pypi: swarmauri_evaluator_subprocess](https://pypi.org/project/swarmauri_evaluator_subprocess/)
|
|
451
|
+
<!-- readme-standards:end project-links -->
|
|
452
|
+
|
|
453
|
+
---
|
|
454
|
+
|
|
455
|
+
## Contributing
|
|
456
|
+
|
|
457
|
+
### How to Contribute
|
|
458
|
+
|
|
459
|
+
If you want to contribute to swarmauri-sdk, read up on our
|
|
460
|
+
[guidelines for contributing](https://github.com/swarmauri/swarmauri-sdk/blob/master/CONTRIBUTING.md)
|
|
461
|
+
that will help you get started.
|
|
462
|
+
|
|
463
|
+
### Development Setup
|
|
464
|
+
|
|
465
|
+
Work from the `pkgs/40-standards/swarmauri_evaluator_subprocess` checkout. Synchronize its declared development environment with uv, then run the relevant package tests and `python -m pytest tests/unit/test_readme_sources.py`. The repository’s dedicated README job installs `readme-standards==0.1.3` without resolving unrelated runtime packages.
|
|
466
|
+
|
|
467
|
+
### Notes for Maintainers
|
|
468
|
+
|
|
469
|
+
Edit authored prose directly in this `swarmauri_evaluator_subprocess` README. Update source examples in `docs/readme/`, then run `readme-standards render --root . --write` from the package directory and review the diff. Required headings and generated blocks come from package-guide-v1.
|
|
470
|
+
|
|
471
|
+
---
|
|
472
|
+
|
|
473
|
+
## Governance
|
|
474
|
+
|
|
475
|
+
### Ownership and Decision Making
|
|
476
|
+
|
|
477
|
+
Changes to `swarmauri_evaluator_subprocess` follow the maintainer review process of [swarmauri/swarmauri-sdk](https://github.com/swarmauri/swarmauri-sdk) and its contribution guide. Author attribution remains in the [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_evaluator_subprocess/pyproject.toml); this README does not assign new publishing or administrative authority.
|
|
478
|
+
|
|
479
|
+
### Standards and Policies
|
|
480
|
+
|
|
481
|
+
`swarmauri_evaluator_subprocess` follows the versioned [package-guide-v1 outline](https://github.com/groupsum/readme-standards/blob/master/docs/outline.md). All fixed headings, hierarchy, order, separators, and package-specific branding are checked by CI; reviewers assess the accuracy and usefulness of authored claims.
|
|
482
|
+
|
|
483
|
+
### Lifecycle and Migration
|
|
484
|
+
|
|
485
|
+
The `swarmauri_evaluator_subprocess` source version is `0.11.0`.
|
|
486
|
+
|
|
487
|
+
---
|
|
488
|
+
|
|
489
|
+
## License and Attribution
|
|
490
|
+
|
|
491
|
+
### License
|
|
492
|
+
|
|
493
|
+
<!-- readme-standards:begin license -->
|
|
494
|
+
Licensed under `Apache-2.0`. See [LICENSE](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_evaluator_subprocess/LICENSE).
|
|
495
|
+
<!-- readme-standards:end license -->
|
|
496
|
+
|
|
497
|
+
### Notices
|
|
498
|
+
|
|
499
|
+
<!-- readme-standards:begin notices -->
|
|
500
|
+
See [NOTICE](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_evaluator_subprocess/NOTICE) for attribution.
|
|
501
|
+
<!-- readme-standards:end notices -->
|
|
502
|
+
|