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

Test training of examples with torchrun call #319

Merged
merged 2 commits into from
Jun 7, 2023
Merged
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
6 changes: 2 additions & 4 deletions tests/openvino/test_training_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def test_single_card_training(self, _, desc: TrainingExampleDescriptor):

self.env[CUDA_VISIBLE_DEVICES] = str(self.available_cuda_device_ids[0])
with tempfile.TemporaryDirectory() as output_dir:
args = [sys.executable, desc.filename, *desc.get_args_with_output_dir(output_dir)]
args = ["torchrun", "--nproc_per_node=1", desc.filename, *desc.get_args_with_output_dir(output_dir)]
proc = subprocess.Popen(
args=args,
cwd=desc.cwd,
Expand Down Expand Up @@ -184,9 +184,7 @@ def test_distributed_data_parallel_training(self, _, desc: TrainingExampleDescri
self.env[CUDA_VISIBLE_DEVICES] = ",".join(map(str, self.available_cuda_device_ids[:2]))
with tempfile.TemporaryDirectory() as output_dir:
args = [
sys.executable,
"-m",
"torch.distributed.run",
"torchrun",
"--rdzv_backend=c10d",
"--rdzv_endpoint=localhost:0",
"--nnodes=1",
Expand Down