Skip to content

Commit

Permalink
refresh request map for every process
Browse files Browse the repository at this point in the history
  • Loading branch information
gavrissh committed Feb 26, 2024
1 parent 4c45d3c commit 255f8ef
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions llm/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,6 @@ class LLMHandler(BaseHandler, ABC):
def __init__(self):
super().__init__()
self.initialized = False
self.request = {
"request_list": defaultdict(int),
"request_ids": defaultdict(int),
"request_type": defaultdict(int),
}
self.tokenizer = None
self.map_location = None
self.device = None
Expand Down Expand Up @@ -155,6 +150,11 @@ def preprocess(self, data: List) -> torch.Tensor:
Tensor: Tokenized input data
"""
input_list = []
self.request = {
"request_list": defaultdict(int),
"request_ids": defaultdict(int),
"request_type": defaultdict(int),
}

for idx, input_data in enumerate(data):
# Pre-process for Kserve v2 format
Expand Down

0 comments on commit 255f8ef

Please sign in to comment.