Fixes #108
This commit is contained in:
@@ -462,12 +462,13 @@ def generate_launch_script(recipe: dict[str, Any], overrides: dict[str, Any], is
|
|||||||
# (not needed for solo; no-ray uses PyTorch distributed instead)
|
# (not needed for solo; no-ray uses PyTorch distributed instead)
|
||||||
if is_solo or no_ray:
|
if is_solo or no_ray:
|
||||||
import re
|
import re
|
||||||
# Remove the entire line containing --distributed-executor-backend
|
# Remove just the flag and its value, not the whole line
|
||||||
# This handles multi-line commands with backslash continuations
|
command = re.sub(r'--distributed-executor-backend\s+\S+', '', command)
|
||||||
|
# Remove lines that are now empty or just a backslash continuation
|
||||||
lines_list = command.split('\n')
|
lines_list = command.split('\n')
|
||||||
filtered_lines = [
|
filtered_lines = [
|
||||||
line for line in lines_list
|
line for line in lines_list
|
||||||
if '--distributed-executor-backend' not in line
|
if line.strip() not in ('', '\\')
|
||||||
]
|
]
|
||||||
command = '\n'.join(filtered_lines)
|
command = '\n'.join(filtered_lines)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user