Skip to content

Commit c8b0a4b

Browse files
committed
Update OVMS address
1 parent 2916a7c commit c8b0a4b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

model_api/python/model_api/adapters/ovms_adapter.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ def save_model(self, path: str, weights_path: str | None = None, version: str |
145145
"INT16": np.int16,
146146
"INT8": np.int8,
147147
"UINT8": np.uint8,
148+
"FP32": np.float32,
148149
}
149150

150151

@@ -154,12 +155,12 @@ def _parse_model_arg(target_model: str):
154155
raise TypeError(msg)
155156
# Expected format: <address>:<port>/models/<model_name>[:<model_version>]
156157
if not re.fullmatch(
157-
r"(\w+\.*\-*)*\w+:\d+\/models\/[a-zA-Z0-9._-]+(\:\d+)*",
158+
r"(\w+\.*\-*)*\w+:\d+\/v2/models\/[a-zA-Z0-9._-]+(\:\d+)*",
158159
target_model,
159160
):
160161
msg = "invalid --model option format"
161162
raise ValueError(msg)
162-
service_url, _, model = target_model.split("/")
163+
service_url, _, _, model = target_model.split("/")
163164
model_spec = model.split(":")
164165
if len(model_spec) == 1:
165166
# model version not specified - use latest

model_api/python/model_api/models/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def create_model(
175175
if isinstance(model, InferenceAdapter):
176176
inference_adapter = model
177177
elif isinstance(model, str) and re.compile(
178-
r"(\w+\.*\-*)*\w+:\d+\/models\/[a-zA-Z0-9._-]+(\:\d+)*",
178+
r"(\w+\.*\-*)*\w+:\d+\/v2/models\/[a-zA-Z0-9._-]+(\:\d+)*",
179179
).fullmatch(model):
180180
inference_adapter = OVMSAdapter(model)
181181
else:

0 commit comments

Comments
 (0)