Skip to content

Commit 4b34f1b

Browse files
committed
Add --hf-model as a valid launch condition if model weights don't exist
1 parent 8a351e4 commit 4b34f1b

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

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)