Skip to content

Commit

Permalink
add node rank
Browse files Browse the repository at this point in the history
  • Loading branch information
mvpatel2000 committed Sep 26, 2023
1 parent 61dfbd6 commit fe042dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion llmfoundry/data/finetuning/dataloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def _build_hf_dataset_from_remote(

# Since we don't know exactly what the extension will be, since it is one of a list
# use a signal file to wait for instead of the desired file
signal_file_path = os.path.join(finetune_dir, '.the_eagle_has_landed')
signal_file_path = os.path.join(finetune_dir, f'.node_{dist.get_node_rank()}_local_rank0_completed')
if dist.get_local_rank() == 0:
try:
get_file(path=name, destination=destination, overwrite=True)
Expand Down
2 changes: 1 addition & 1 deletion llmfoundry/models/hf/hf_causal_lm.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def __init__(self, om_model_config: Union[DictConfig,
f'init_device="{init_device}" must be either "cpu" or "meta".'
)

signal_file_path = '.local_rank0_completed_autoresume'
signal_file_path = f'.node_{dist.get_node_rank()}_local_rank0_completed'
if dist.get_local_rank() == 0:
with open(signal_file_path, 'wb') as f:
f.write(b'local_rank0_completed_download')
Expand Down

0 comments on commit fe042dc

Please sign in to comment.