Add typo checker in pre-commit (#6179)
Co-authored-by: Brayden Zhong <b8zhong@uwaterloo.ca>
This commit is contained in:
@@ -267,7 +267,7 @@ async def get_requests(
|
||||
try:
|
||||
request = await asyncio.wait_for(
|
||||
input_requests_queue.get(), timeout=300
|
||||
) # Wait for 5 minites then abort
|
||||
) # Wait for 5 minutes then abort
|
||||
except Exception as e:
|
||||
print(f"exception: {e}")
|
||||
break
|
||||
@@ -514,7 +514,7 @@ async def benchmark(
|
||||
print("{:<40} {:<10}".format("Traffic request rate:", request_rate))
|
||||
print(
|
||||
"{:<40} {:<10}".format(
|
||||
"Max reqeuest concurrency:",
|
||||
"Max request concurrency:",
|
||||
max_concurrency if max_concurrency else "not set",
|
||||
)
|
||||
)
|
||||
|
||||
@@ -95,7 +95,7 @@ def bench_schema(args):
|
||||
latency = time.time() - tic
|
||||
|
||||
# Check if the outputs are valid
|
||||
indexs = []
|
||||
indexes = []
|
||||
for i, state in enumerate(states):
|
||||
try:
|
||||
schema = json.loads(arguments[i]["json_schema"])
|
||||
@@ -103,7 +103,7 @@ def bench_schema(args):
|
||||
assert jsonschema.validate(obj, schema) is None
|
||||
except Exception as e:
|
||||
print(e)
|
||||
indexs.append(i)
|
||||
indexes.append(i)
|
||||
|
||||
return states, latency
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ from tqdm import tqdm
|
||||
|
||||
def generate_lines(random_words, num_lines, redirect_ratio):
|
||||
prefix = "Here is a list of lines, each with its corresponding REGISTER_CONTENT value. Please memorize them. Be prepared to provide the REGISTER_CONTENT value for a specific line index when I ask."
|
||||
suffix = "The list has ended. Please give the final REGISTER_CONTENT value for a specific line after resovling the redirections and references. For example, the REGISTER_CONTENT of Line __idx0__ is __val0__. The REGISTER_CONTENT of Line __idx1__ is __val1__. The REGISTER_CONTENT of Line __idx2__ is __val2__. The REGISTER_CONTENT of Line ??? is"
|
||||
suffix = "The list has ended. Please give the final REGISTER_CONTENT value for a specific line after resolving the redirections and references. For example, the REGISTER_CONTENT of Line __idx0__ is __val0__. The REGISTER_CONTENT of Line __idx1__ is __val1__. The REGISTER_CONTENT of Line __idx2__ is __val2__. The REGISTER_CONTENT of Line ??? is"
|
||||
|
||||
# Raw lines
|
||||
visited_indices = set([None])
|
||||
|
||||
@@ -17,7 +17,7 @@ ASSISTANT_SUFFIX = " </s><s>"
|
||||
|
||||
def multi_document_qa(docs, question, generate):
|
||||
s = USER_PREFIX
|
||||
s += "Pleaes answer a question according to given documents.\n"
|
||||
s += "Please answer a question according to given documents.\n"
|
||||
s += "Question:" + question + "Documents begin.\n"
|
||||
|
||||
s += "".join(docs)
|
||||
|
||||
@@ -13,7 +13,7 @@ from sglang.utils import dump_state_text, read_jsonl
|
||||
@sgl.function
|
||||
def multi_document_qa(s, docs, question):
|
||||
s += sgl.user_begin()
|
||||
s += "Pleaes answer a question according to given documents.\n"
|
||||
s += "Please answer a question according to given documents.\n"
|
||||
s += "Question:" + question + "Documents begin.\n"
|
||||
|
||||
forks = s.fork(len(docs))
|
||||
|
||||
Reference in New Issue
Block a user