Skip to content

Commit 99f8536

Browse files
committed
Add a workaround to avoid unexpected conversion to int when loading list values from configs
1 parent 372143f commit 99f8536

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/python/model_api/models/types.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,8 @@ def __init__(
178178
self.value_type = value_type
179179

180180
def from_str(self, value: str) -> list[Any]:
181+
if self.value_type is str or self.value_type is StringValue:
182+
return value.split()
181183
try:
182184
floats = [float(i) for i in value.split()]
183185
try:

0 commit comments

Comments
 (0)