Skip to content

Commit 07a4973

Browse files
committed
Add CLI launch options for new args, add new args to LaunchOptions, rename to , use shorthand convention for --bind in singularity command
1 parent 203d093 commit 07a4973

File tree

5 files changed

+35
-3
lines changed

5 files changed

+35
-3
lines changed

vec_inf/cli/_cli.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,21 @@ def cli() -> None:
7272
type=str,
7373
help="Quality of service",
7474
)
75+
@click.option(
76+
"--exclude",
77+
type=str,
78+
help="Exclude certain nodes from the resources granted to the job",
79+
)
80+
@click.option(
81+
"--node-list",
82+
type=str,
83+
help="Request a specific list of nodes for deployment",
84+
)
85+
@click.option(
86+
"--bind",
87+
type=str,
88+
help="Additional binds for the singularity container as a comma separated list of bind paths",
89+
)
7590
@click.option(
7691
"--time",
7792
type=str,
@@ -124,8 +139,16 @@ def launch(
124139
Number of nodes to use
125140
- gpus_per_node : int, optional
126141
Number of GPUs per node
142+
- account : str, optional
143+
Charge resources used by this job to specified account
127144
- qos : str, optional
128145
Quality of service tier
146+
- exclude : str, optional
147+
Exclude certain nodes from the resources granted to the job
148+
- node_list : str, optional
149+
Request a specific list of nodes for deployment
150+
- bind : str, optional
151+
Additional binds for the singularity container
129152
- time : str, optional
130153
Time limit for job
131154
- venv : str, optional

vec_inf/client/_client_vars.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ class SlurmScriptTemplate(TypedDict):
166166
f"export LD_LIBRARY_PATH={LD_LIBRARY_PATH}",
167167
f"export VLLM_NCCL_SO_PATH={VLLM_NCCL_SO_PATH}",
168168
],
169-
"singularity_command": f"singularity exec --nv --bind {{model_weights_path}}:{{model_weights_path}}{{additional_binds}} --containall {SINGULARITY_IMAGE}",
169+
"singularity_command": f"singularity exec --nv --bind {{model_weights_path}}{{additional_binds}} --containall {SINGULARITY_IMAGE}",
170170
"activate_venv": "source {venv}/bin/activate",
171171
"server_setup": {
172172
"single_node": [

vec_inf/client/_slurm_script_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def __init__(self, params: dict[str, Any]):
3939
self.params = params
4040
self.is_multinode = int(self.params["num_nodes"]) > 1
4141
self.use_singularity = self.params["venv"] == "singularity"
42-
self.additional_binds = self.params.get("binds", "")
42+
self.additional_binds = self.params.get("bind", "")
4343
if self.additional_binds:
4444
self.additional_binds = f" --bind {self.additional_binds}"
4545
self.model_weights_path = str(

vec_inf/client/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ class ModelConfig(BaseModel):
114114
node_list: Optional[str] = Field(
115115
default=None, description="Request a specific list of nodes for deployment"
116116
)
117-
binds: Optional[str] = Field(
117+
bind: Optional[str] = Field(
118118
default=None, description="Additional binds for the singularity container"
119119
)
120120
venv: str = Field(

vec_inf/client/models.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,12 @@ class LaunchOptions:
170170
Quality of Service level
171171
time : str, optional
172172
Time limit for the job
173+
exclude : str, optional
174+
Exclude certain nodes from the resources granted to the job
175+
node_list : str, optional
176+
Request a specific list of nodes for deployment
177+
bind : str, optional
178+
Additional binds for the singularity container
173179
vocab_size : int, optional
174180
Size of model vocabulary
175181
data_type : str, optional
@@ -191,6 +197,9 @@ class LaunchOptions:
191197
gpus_per_node: Optional[int] = None
192198
account: Optional[str] = None
193199
qos: Optional[str] = None
200+
exclude: Optional[str] = None
201+
node_list: Optional[str] = None
202+
bind: Optional[str] = None
194203
time: Optional[str] = None
195204
vocab_size: Optional[int] = None
196205
data_type: Optional[str] = None

0 commit comments

Comments
 (0)