Minor fix in compiler & format (#545)

This commit is contained in:
sglang
2024-06-29 23:42:14 -07:00
committed by GitHub
parent 9ce89bc14b
commit 11616fc6bd
12 changed files with 28 additions and 33 deletions

View File

@@ -38,7 +38,6 @@ def sample_requests(
num_requests: int,
tokenizer: AutoTokenizer,
) -> List[Tuple[str, int, int]]:
def load_dataset():
with open(dataset_path, encoding="utf-8") as f:
dataset = json.load(f)

View File

@@ -48,9 +48,9 @@ def generate_lines(random_words, num_lines, redirect_ratio):
)
for i in redirect_indices:
target_idx = np.random.choice(min(i * 2 + 100, num_lines))
lines[i] = (
f"Line {indices[i]}: The REGISTER_CONTENT is the same as Line {indices[target_idx]}."
)
lines[
i
] = f"Line {indices[i]}: The REGISTER_CONTENT is the same as Line {indices[target_idx]}."
redirects[i] = target_idx
# Build links and find sources