Skip to content

Commit

Permalink
common print
Browse files Browse the repository at this point in the history
  • Loading branch information
wenzhangliu committed Oct 4, 2024
1 parent 0d1fee6 commit 3ed2781
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions xuance/common/common_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,6 @@ def get_runner(method,
else:
device = args.device
distributed_training = True if args.distributed_training else False
if distributed_training:
print(f"Calculating device: Multi-GPU distributed training.")
else:
print(f"Calculating device: {device}")

dl_toolbox = args[0].dl_toolbox if type(args) == list else args.dl_toolbox # The choice of deep learning toolbox.
rank = 0 # Avoid printing the same information when using distributed training.
Expand Down Expand Up @@ -203,6 +199,11 @@ def get_runner(method,
else:
raise AttributeError("Cannot find a deep learning toolbox named " + dl_toolbox)

if distributed_training:
print(f"Calculating device: Multi-GPU distributed training.")
else:
print(f"Calculating device: {device}")

if type(args) == list:
agents_name_string = []
for i_alg in range(len(method)):
Expand Down

0 comments on commit 3ed2781

Please sign in to comment.