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
221 222 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 | |
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,
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
2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 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 | |