Import YOLOv5 dataloader (#94)
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
ae05d44877
commit
16e3c08883
12 changed files with 1761 additions and 23 deletions
|
|
@ -47,7 +47,7 @@ def generate_ddp_command(world_size, trainer):
|
|||
if using_cli:
|
||||
file_name = generate_ddp_file(trainer)
|
||||
return [
|
||||
sys.executable, "-m", "torch.distributed.launch", "--nproc_per_node", f"{world_size}", "--master_port",
|
||||
sys.executable, "-m", "torch.distributed.run", "--nproc_per_node", f"{world_size}", "--master_port",
|
||||
f"{find_free_network_port()}", file_name] + sys.argv[1:]
|
||||
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ def ddp_cleanup(command, trainer):
|
|||
# delete temp file if created
|
||||
# TODO: this is a temp solution in case the file is deleted before DDP launching
|
||||
time.sleep(5)
|
||||
tempfile_suffix = str(id(trainer)) + ".py"
|
||||
tempfile_suffix = f"{id(trainer)}.py"
|
||||
if tempfile_suffix in "".join(command):
|
||||
for chunk in command:
|
||||
if tempfile_suffix in chunk:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue