Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(train): make timeout of wenet_join configurable #2123

Merged
merged 1 commit into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion wenet/bin/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def main():

# NOTE(xcsong): Why we need a new group? see `train_utils.py::wenet_join`
group_join = dist.new_group(backend="gloo",
timeout=datetime.timedelta(seconds=30))
timeout=datetime.timedelta(seconds=args.timeout))

dist.barrier() # NOTE(xcsong): Ensure all ranks start Train at the same time.
executor.train(model, optimizer, scheduler, train_data_loader,
Expand Down
3 changes: 3 additions & 0 deletions wenet/utils/train_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ def add_ddp_args(parser):


def add_deepspeed_args(parser):
parser.add_argument('--timeout', default=30, type=int,
help='timeout (in seconds) of wenet_join. ' +
'30s for aishell & 300s for wenetspeech')
parser.add_argument('--local_rank', type=int, default=-1,
help='local rank passed from distributed launcher')
parser.add_argument('--deepspeed.save_states',
Expand Down