Move FT modules into topic folders (mechanical) - #1596
Conversation
There was a problem hiding this comment.
Code Review
This pull request reorganizes the codebase structure by refactoring and moving various utility modules into more structured subdirectories. Specifically, fault tolerance (FT) utilities have been relocated to miles/utils/ft_utils/, auditing and witness utilities to miles/utils/audit_utils/, tracking and logging utilities to miles/utils/tracking_utils/, and certain test utilities (like clock and det_process_group) to miles/utils/test_utils/. Megatron-specific fault tolerance modules have also been moved under miles/backends/megatron_utils/ft/. All corresponding imports and test files have been updated to reflect these new paths. I have no feedback to provide as there are no review comments.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
fe3ede2 to
def7dff
Compare
470cbc8 to
b444cac
Compare
def7dff to
2bc8c58
Compare
CI status note (2026-07-08):
Fix: radixark/Megatron-LM#64 wires the existing (previously dead) |
|
Rerun result: |
b444cac to
fbb7115
Compare
2bc8c58 to
26c7e0d
Compare
Two independent failures on 1. GLM5 LoRA tests ( 2. FT e2e tests ( Root cause: miles auto-sets Consequence: the FT tests can only go green in CI against an image built from a |
Why the FT tests can't run in CI yet (labels removed). The FT e2e tests were moved to the
Net: this is a build-order (chicken-and-egg) situation — the FT tests can only go green against an image built from a So the |
fbb7115 to
713d01b
Compare
26c7e0d to
a4ba392
Compare
713d01b to
2a07a3f
Compare
a4ba392 to
820ef58
Compare
2a07a3f to
d8a0036
Compare
820ef58 to
d9abd9a
Compare
d8a0036 to
73b6376
Compare
d9abd9a to
7460c6f
Compare
73b6376 to
d46e663
Compare
7460c6f to
8bfd8a3
Compare
Group the fault-tolerance work into folders instead of scattering it across miles/utils and megatron_utils: - miles/utils/ft_utils/: control_server, health_checker, heartbeat_utils, indep_dp, mini_ft_controller, process_group_utils - miles/utils/audit_utils/: event_analyzer, event_logger, witness, checksum_utils, process_identity - miles/utils/tracking_utils/: structured_log - miles/utils/test_utils/: clock, det_process_group - miles/backends/megatron_utils/ft/: checkpoint_transfer, in_memory_checkpoint, indep_dp, types The tracking facade moves from tracking_utils/__init__.py to tracking_utils/tracking.py (callers import the submodule) so that importing tracking_utils.structured_log does not run a package __init__ that circularly imports the event logger. Pure relocation: git-mv moves, empty package __init__ files, dotted import-path rewrites, and dot-depth fixes for the relative imports that cross a moved path (plus isort reordering). No code changes. Script: ft_restructure_transform.py (attached to the PR); reproduce via verify_mechanical_refactor(base, target, transform) — byte-identical. ci-sglang-pr: #28524
32cbd0e to
b02701b
Compare

Group the fault-tolerance work into folders instead of scattering it
across miles/utils and megatron_utils:
indep_dp, mini_ft_controller, process_group_utils
checksum_utils, process_identity
in_memory_checkpoint, indep_dp, types
The tracking facade moves from tracking_utils/init.py to
tracking_utils/tracking.py (callers import the submodule) so that
importing tracking_utils.structured_log does not run a package
init that circularly imports the event logger.
Pure relocation: git-mv moves, empty package init files, dotted
import-path rewrites, and dot-depth fixes for the relative imports
that cross a moved path (plus isort reordering). No code changes.
Script: ft_restructure_transform.py (attached to the PR); reproduce via
verify_mechanical_refactor(base, target, transform) — byte-identical.
ci-sglang-pr: #28524