Skip to content

Commit 08f7a7a

Browse files
committed
Add cpus_per_task and mem_per_node to CLI launch options, add response rendering for additional bind paths
1 parent 9ace730 commit 08f7a7a

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

vec_inf/cli/_cli.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,16 @@ def cli() -> None:
6969
type=int,
7070
help="Number of GPUs/node to use, default to suggested resource allocation for model",
7171
)
72+
@click.option(
73+
"--cpus-per-task",
74+
type=int,
75+
help="Number of CPU cores per task",
76+
)
77+
@click.option(
78+
"--mem-per-node",
79+
type=str,
80+
help="Memory allocation per node in GB format (e.g., '32G')",
81+
)
7282
@click.option(
7383
"--account",
7484
"-A",
@@ -165,6 +175,10 @@ def launch(
165175
Number of nodes to use
166176
- gpus_per_node : int, optional
167177
Number of GPUs per node
178+
- cpus_per_task : int, optional
179+
Number of CPU cores per task
180+
- mem_per_node : str, optional
181+
Memory allocation per node in GB format (e.g., '32G')
168182
- account : str, optional
169183
Charge resources used by this job to specified account
170184
- work_dir : str, optional

vec_inf/cli/_helper.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,19 @@ def format_table_output(self) -> Table:
8989
for arg, value in self.params["vllm_args"].items():
9090
table.add_row(f" {arg}:", str(value))
9191

92-
# Add Environment Variable Configuration Details
92+
# Add environment variable configuration details
9393
table.add_row("Environment Variables", style="magenta")
9494
for arg, value in self.params["env"].items():
9595
table.add_row(f" {arg}:", str(value))
9696

97+
# Add bind path configuration details
98+
table.add_row("Bind Paths", style="magenta")
99+
for path in self.params["bind"].split(","):
100+
host = target = path
101+
if ":" in path:
102+
host, target = path.split(":")
103+
table.add_row(f" {host}:", target)
104+
97105
return table
98106

99107

vec_inf/client/models.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,10 @@ class LaunchOptions:
194194
Number of nodes to allocate
195195
gpus_per_node : int, optional
196196
Number of GPUs per node
197+
cpus_per_task : int, optional
198+
Number of CPUs per task
199+
mem_per_node : str, optional
200+
Memory per node
197201
account : str, optional
198202
Account name for job scheduling
199203
work_dir : str, optional
@@ -232,6 +236,8 @@ class LaunchOptions:
232236
resource_type: Optional[str] = None
233237
num_nodes: Optional[int] = None
234238
gpus_per_node: Optional[int] = None
239+
cpus_per_task: Optional[int] = None
240+
mem_per_node: Optional[str] = None
235241
account: Optional[str] = None
236242
work_dir: Optional[str] = None
237243
qos: Optional[str] = None

0 commit comments

Comments
 (0)