Skip to content

Commit

Permalink
[python] Fixes batch header key issue (deepjavalibrary#1006)
Browse files Browse the repository at this point in the history
  • Loading branch information
frankfliu authored Aug 9, 2023
1 parent 9885cd2 commit a7b7c2d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions engines/python/setup/djl_python/inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,11 @@ def get_batches(self) -> list:
batch = []
for i in range(batch_size):
item = Input()
item.properties = {}
prefix = f"batch_{i}."
length = len(prefix)
for key, value in self.properties.items():
if key.startswith(prefix):
key = key[:length]
key = key[length:]
item.properties[key] = value

batch.append(item)
Expand Down

0 comments on commit a7b7c2d

Please sign in to comment.