Skip to content

Commit cdd6ad0

Browse files
authored
Merge branch 'main' into pre-commit-ci-update-config
2 parents 25b0ffc + ca609fa commit cdd6ad0

2 files changed

Lines changed: 16 additions & 6 deletions

File tree

.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

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",

0 commit comments

Comments
 (0)