Skip to content

Commit 8968228

Browse files
sl-gnsibianl
andauthored
feat(cli): join command set default value as 'auto' (#39)
Co-authored-by: sibianl <sibianl@rings.net.cn>
1 parent e24c105 commit 8968228

File tree

5 files changed

+14
-33
lines changed

5 files changed

+14
-33
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ Select model config and click continue.
111111
![Node join](docs/images/node-join.png)
112112
This page will show the join command like blow.
113113
```sh
114+
# local area network env
115+
parallax join
116+
# public network env
114117
parallax join -s {scheduler-address}
115118
# example
116119
parallax join -s /ip4/192.168.1.2/tcp/5001/p2p/xxxxxxxxxxxx
@@ -136,6 +139,9 @@ Please notice and record the scheduler ip4 address generated in the terminal.
136139
#### Step 2: Join each distributed nodes
137140
For each distributed nodes including the main node, open a terminal and join the server with the scheduler address.
138141
```sh
142+
# local area network env
143+
parallax join
144+
# public network env
139145
parallax join -s {scheduler-address}
140146
```
141147
For example:

scripts/README.md

Lines changed: 0 additions & 25 deletions
This file was deleted.

scripts/join.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ fi
88
helpFunction()
99
{
1010
echo ""
11-
echo "Usage: $0 -s SCHEDULER_ADDR"
12-
echo -e "\t-s Description of what is SCHEDULER_ADDR"
11+
echo "Usage: $0 [-s SCHEDULER_ADDR]"
12+
echo -e "\t-s SCHEDULER_ADDR (default: auto)"
1313
exit 1 # Exit script after printing help
1414
}
1515

16-
while getopts "s:m:i:" opt
16+
SCHEDULER_ADDR="auto"
17+
18+
while getopts "s:" opt
1719
do
1820
case "$opt" in
1921
s ) SCHEDULER_ADDR="$OPTARG" ;;
@@ -24,11 +26,9 @@ done
2426
# Print helpFunction in case parameters are empty
2527
if [ -z "$SCHEDULER_ADDR" ]
2628
then
27-
echo "Some or all of the parameters are empty";
28-
helpFunction
29+
SCHEDULER_ADDR="auto"
2930
fi
3031

31-
# Begin script in case all parameters are correct
3232
echo "$SCHEDULER_ADDR"
3333

3434
export SGL_ENABLE_JIT_DEEPGEMM=0

src/backend/server/static_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"nvidia/Llama-3.1-8B-Instruct-FP8",
3030
]
3131

32-
NODE_JOIN_COMMAND_LOCAL_NETWORK = """parallax join -s {scheduler_addr}"""
32+
NODE_JOIN_COMMAND_LOCAL_NETWORK = """parallax join"""
3333

3434
NODE_JOIN_COMMAND_PUBLIC_NETWORK = """parallax join -s {scheduler_addr}"""
3535

src/parallax/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def main():
151151
"join", help="Join a distributed cluster (equivalent to scripts/join.sh)"
152152
)
153153
join_parser.add_argument(
154-
"-s", "--scheduler-addr", type=str, help="Scheduler address (required)"
154+
"-s", "--scheduler-addr", default="auto", type=str, help="Scheduler address (required)"
155155
)
156156

157157
args = parser.parse_args()

0 commit comments

Comments
 (0)