Commit e548ebb
committed
refactor(archon): extract utility functions and simplify engine code
Move optimizer/scheduler creation, activation checkpoint config,
zero-bubble validation, deterministic mode setup, and pad_to_maximum
validation into archon_utils.py for reuse and testability. Cache
tp/cp parallel groups to avoid repeated lookups, and use context
managers for DistributedLock.
Key changes:
- Extract 6 utility functions into new archon_utils.py module
- Cache _tp_group and _cp_group on engine initialization
- Add __enter__/__exit__ to DistributedLock for context manager usage
- Replace manual lock acquire/release with `with` statements
- Add venv activation note to installation docs1 parent 6093109 commit e548ebb
7 files changed
Lines changed: 486 additions & 340 deletions
File tree
- areal
- experimental/engine
- utils
- docs/tutorial
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
254 | | - | |
| 253 | + | |
255 | 254 | | |
256 | 255 | | |
257 | 256 | | |
| |||
352 | 351 | | |
353 | 352 | | |
354 | 353 | | |
355 | | - | |
356 | | - | |
| 354 | + | |
357 | 355 | | |
358 | 356 | | |
359 | | - | |
360 | | - | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
| |||
0 commit comments