reach.sweep¶
Execute multi-scale catalog evaluation sweeps to measure reachability decay and capacity knees.
Execute catalog scaling sweeps and detect capacity knees.
PairedTrialOutcomes ¶
Bases: BaseModel
Represent paired McNemar discordant trial outcomes across sweep scales.
Source code in src/reach/sweep.py
ReplicateCollisionDiagnostic ¶
Bases: BaseModel
Identify a query whose routing outcome flips across catalog replicates at scale K.
Source code in src/reach/sweep.py
ScalingPoint ¶
Bases: BaseModel
Represent evaluation outcomes and decomposition for a single catalog scale point.
Source code in src/reach/sweep.py
all_probes_errored
property
¶
Return True when at least one probe ran and every probe failed with a runtime error.
ScalingStudy ¶
Bases: BaseModel
Represent multi-scale catalog scaling study and knee curvature analysis.
Source code in src/reach/sweep.py
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 | |
load
classmethod
¶
Load and deserialize a ScalingStudy from a JSON file.
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
If the target file does not exist. |
IsADirectoryError
|
If the target path is a directory. |
ValueError
|
If the target path contains invalid study data. |
Source code in src/reach/sweep.py
save ¶
Serialize the scaling study to a formatted JSON file atomically.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Path | str
|
Target file path for the serialized JSON output. |
required |
Returns:
| Type | Description |
|---|---|
Path
|
The resolved Path where the study was written. |
Raises:
| Type | Description |
|---|---|
OSError
|
If directory creation or file writing fails. |
Source code in src/reach/sweep.py
run_scaling_sweep ¶
run_scaling_sweep(
config: RunConfig | None = None,
target_skill: str | None = None,
scales: Sequence[int] | None = None,
anchor: int | Sequence[str] | str | None = None,
runtime: AgentRuntime | None = None,
rivals_share: float = 0.5,
noise_floor: float | None = None,
workers: int = 1,
skills: Sequence[Skill] | None = None,
query_set: QuerySet | None = None,
attempts: int | None = None,
allow_truncation: bool = True,
*,
bootstrap_iterations: int | None = None,
seed: int | None = None,
catalog_replicates: int | None = None,
knee_metric: Literal["trajectory", "entrypoint"]
| None = None,
on_scale_complete: Callable[
[int, int, ScalingPoint, ScalingStudy], None
]
| None = None,
) -> ScalingStudy
Execute multi-scale catalog evaluation sweep and return scaling analysis.
Source code in src/reach/sweep.py
2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 | |