Skip to content

Commit 8c24fe5

Browse files
authored
Add a workaround to avoid unexpected conversion to int when loading list values from configs (#316)
1 parent 372143f commit 8c24fe5

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

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)