Skip to content

Commit

Permalink
Force text generation to exit if checkpoint fails to load
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanriach committed Jul 11, 2023
1 parent 7861224 commit cd961e1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/run_text_generation_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ def add_text_generate_args(parser):
if args.num_layers_per_virtual_pipeline_stage is not None:
print("Interleaved pipeline schedule is not yet supported for text generation.")
exit()
print_rank_0("WARNING: Forcing exit_on_missing_checkpoint to True for text "
"generation.")
args.exit_on_missing_checkpoint = True
# Set up model and load checkpoint
model = get_model(model_provider, wrap_with_ddp=False)

Expand Down

0 comments on commit cd961e1

Please sign in to comment.