Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/megatron/bridge/training/initialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,9 @@ def initialize_megatron(
)

# Compile dataset helpers after distributed initialization
# Use local rank to ensure each node compiles independently (multi-node without shared filesystem)
if torch.distributed.is_initialized():
if get_rank_safe() == 0:
if get_local_rank_preinit() == 0:
start_time = time.time()
print("> compiling dataset index builder ...")
compile_helpers()
Expand Down
Loading