Skip to content

Commit

Permalink
remove unused field
Browse files Browse the repository at this point in the history
  • Loading branch information
Qing Lan committed May 3, 2024
1 parent 0751ea4 commit 728d64d
Showing 1 changed file with 1 addition and 35 deletions.
36 changes: 1 addition & 35 deletions engines/python/setup/djl_python/tests/test_rolling_batch.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import json
import os
import unittest

import djl_python.rolling_batch.rolling_batch
from djl_python.rolling_batch.rolling_batch import Request, Token, _json_output_formatter, _jsonlines_output_formatter, \
RollingBatch
from djl_python.rolling_batch.rolling_batch import Request, Token, _json_output_formatter, _jsonlines_output_formatter


class TestRollingBatch(unittest.TestCase):
Expand Down Expand Up @@ -267,22 +265,6 @@ def custom_fmt(token: Token, first_token: bool, last_token: bool,
result["finish_reason"] = details["finish_reason"]
return json.dumps(result) + "\n"

class CustomRB(RollingBatch):

def preprocess_requests(self, requests):
pass

def postprocess_results(self):
pass

def inference(self, input_data, parameters):
pass

def get_tokenizer(self):
pass

rb = CustomRB()

req = Request(132,
"This is a wonderful day",
parameters={
Expand Down Expand Up @@ -321,22 +303,6 @@ def custom_fmt(token: Token, first_token: bool, last_token: bool,
result = details
return json.dumps(result) + "\n"

class CustomRB(RollingBatch):

def preprocess_requests(self, requests):
pass

def postprocess_results(self):
pass

def inference(self, input_data, parameters):
pass

def get_tokenizer(self):
pass

rb = CustomRB()

req = Request(132,
"This is a wonderful day",
parameters={
Expand Down

0 comments on commit 728d64d

Please sign in to comment.