Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@Laughing-q I attempted to create a workflow where the
generate_ddp_command
checks if the command is coming from cli. Then it creates a temp file with the training command insideif __name__ == "__main__":
block and uses that file to generate the DDP command.Note:
I have checked until the command/file generation and the syntax in the file seems correct. Can you check if it works as supposed to with DDP also?
I have made this PR to your branch instead of committing there directly as I'm not sure if it'll work. Merge this to your branch if this works.
π οΈ PR Summary
Made with β€οΈ by Ultralytics Actions
π Summary
Enhancement of multi-GPU training setup in YOLO training engine.
π Key Changes
train
method intrainer.py
to passself
togenerate_ddp_command
.generate_ddp_file
indist.py
that generates a temporary Python file for distributed training configuration.generate_ddp_command
indist.py
to handle CLI usage and utilize the newgenerate_ddp_file
when necessary.π― Purpose & Impact