Skip to content

Commit 5ba10c1

Browse files
authored
Merge branch 'main' into dependabot/github_actions/codecov/codecov-action-6.0.0
2 parents dc74fbb + 602fa0f commit 5ba10c1

7 files changed

Lines changed: 293 additions & 424 deletions

File tree

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: Model request
33
about: Request for new model weights or model config
4-
title: New model request for [MODEL_NAME]
4+
title: New model request for [MODEL_NAME] on [CLUSTER_NAME]
55
labels: new model
66
assignees: XkunW
77

@@ -11,4 +11,7 @@ assignees: XkunW
1111
Model weights | Model config | Both
1212

1313
### Model Name
14-
Name of the model requested
14+
Name of the model requested, preferably with model repo URL as well (HuggingFace, ModelScope, etc.)
15+
16+
### Cluster Name
17+
On which cluster do you need this model

.github/workflows/docker.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
df -h
5959
6060
- name: Set up Docker Buildx
61-
uses: docker/setup-buildx-action@v3
61+
uses: docker/setup-buildx-action@v4
6262

6363
- name: Log in to Docker Hub
6464
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9
@@ -68,12 +68,12 @@ jobs:
6868

6969
- name: Extract metadata (tags, labels) for Docker
7070
id: meta
71-
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051
71+
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf
7272
with:
7373
images: vectorinstitute/vector-inference-${{ matrix.backend }}
7474

7575
- name: Build and push Docker image
76-
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8
76+
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294
7777
with:
7878
context: .
7979
file: ./${{ matrix.backend }}.Dockerfile

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ repos:
1717
- id: check-toml
1818

1919
- repo: https://github.com/astral-sh/ruff-pre-commit
20-
rev: 'v0.15.6'
20+
rev: 'v0.15.9'
2121
hooks:
2222
- id: ruff
2323
args: [--fix, --exit-non-zero-on-fix]
@@ -26,7 +26,7 @@ repos:
2626
types_or: [python, jupyter]
2727

2828
- repo: https://github.com/pre-commit/mirrors-mypy
29-
rev: v1.19.1
29+
rev: v1.20.0
3030
hooks:
3131
- id: mypy
3232
entry: python3 -m mypy --config-file pyproject.toml

uv.lock

Lines changed: 251 additions & 405 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vec_inf/client/_helper.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,22 @@ def _get_model_configuration(self, config_path: str | None = None) -> ModelConfi
118118

119119
model_weights_path = Path(model_weights_parent_dir, self.model_name)
120120

121-
# Only give a warning if weights exist but config missing
121+
if self.kwargs.get("hf_model"):
122+
return ModelConfig(
123+
model_name=self.model_name,
124+
model_family="model_family_placeholder",
125+
model_type="LLM",
126+
gpus_per_node=1,
127+
num_nodes=1,
128+
vocab_size=1000,
129+
model_weights_parent_dir=Path(str(model_weights_parent_dir)),
130+
)
131+
122132
if model_weights_path.exists():
123133
self._warn(
124-
f"Warning: '{self.model_name}' configuration not found in config, please ensure model configuration are properly set in command arguments",
134+
f"Warning: '{self.model_name}' configuration not found in config, "
135+
"please ensure model configuration are properly set in command arguments",
125136
)
126-
# Return a dummy model config object with model name and weights parent dir
127137
return ModelConfig(
128138
model_name=self.model_name,
129139
model_family="model_family_placeholder",

vec_inf/client/_slurm_templates.py

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,15 @@ class SlurmScriptTemplate(TypedDict):
186186
],
187187
"write_to_json": [
188188
'\njson_path="{log_dir}/{model_name}.$SLURM_JOB_ID/{model_name}.$SLURM_JOB_ID.json"',
189-
'jq --arg server_addr "$server_address" \\',
190-
" '. + {{\"server_address\": $server_addr}}' \\",
191-
' "$json_path" > temp.json \\',
192-
' && mv temp.json "$json_path"',
189+
'tmp_json="${{json_path}}.tmp.$$"',
190+
"for _attempt in 1 2 3 4 5; do",
191+
' jq --arg server_addr "$server_address" \\',
192+
" '. + {{\"server_address\": $server_addr}}' \\",
193+
' "$json_path" > "$tmp_json" \\',
194+
' && mv "$tmp_json" "$json_path" \\',
195+
" && break",
196+
" sleep 2",
197+
"done",
193198
],
194199
"launch_cmd": {
195200
"vllm": [
@@ -303,10 +308,15 @@ class BatchModelLaunchScriptTemplate(TypedDict):
303308
"write_to_json": [
304309
"het_job_id=$(($SLURM_JOB_ID+{het_group_id}))",
305310
'json_path="{log_dir}/{slurm_job_name}.$het_job_id/{model_name}.$het_job_id.json"',
306-
'jq --arg server_addr "$server_address" \\',
307-
" '. + {{\"server_address\": $server_addr}}' \\",
308-
' "$json_path" > temp_{model_name}.json \\',
309-
' && mv temp_{model_name}.json "$json_path"\n',
311+
'tmp_json="${{json_path}}.tmp.$$"',
312+
"for _attempt in 1 2 3 4 5; do",
313+
' jq --arg server_addr "$server_address" \\',
314+
" '. + {{\"server_address\": $server_addr}}' \\",
315+
' "$json_path" > "$tmp_json" \\',
316+
' && mv "$tmp_json" "$json_path" \\',
317+
" && break",
318+
" sleep 2",
319+
"done\n",
310320
],
311321
"container_command": f"{CONTAINER_MODULE_NAME} exec --nv --containall {{image_path}} \\",
312322
"launch_cmd": {

vec_inf/config/environment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ required_args:
2424

2525
python_version: "python3.12"
2626

27-
model_types: ["LLM", "VLM", "Text_Embedding", "Reward_Modeling", "OCR"] # Derived from models.yaml
27+
model_types: ["LLM", "VLM", "Text_Embedding", "Reward_Modeling", "OCR", "Audio"] # Derived from models.yaml
2828

2929
default_args:
3030
cpus_per_task: "16"

0 commit comments

Comments
 (0)