Unverified Commit 62797440 authored by Chang Su's avatar Chang Su Committed by GitHub
Browse files

[Lint] Add `python/sglang` to ruff F401 checks and remove unused imports in files (#11685)

parent 2614adf9
......@@ -4,7 +4,6 @@ import torch
from sglang.srt.configs.model_config import AttentionArch
from sglang.srt.layers.attention.flashattention_backend import FlashAttentionBackend
from sglang.srt.layers.attention.torch_native_backend import TorchNativeAttnBackend
from sglang.srt.layers.radix_attention import RadixAttention
from sglang.srt.mem_cache.memory_pool import MLATokenToKVPool
from sglang.srt.model_executor.forward_batch_info import ForwardBatch, ForwardMode
......
......@@ -2,8 +2,6 @@ import unittest
import torch
from sglang.srt.layers.attention.flashattention_backend import FlashAttentionBackend
from sglang.srt.layers.radix_attention import RadixAttention
from sglang.srt.mem_cache.memory_pool import MLATokenToKVPool
from sglang.srt.model_executor.forward_batch_info import ForwardBatch, ForwardMode
from sglang.test.test_utils import CustomTestCase
......
import argparse
import ast
import asyncio
import json
import re
import time
import numpy as np
import sglang as sgl
from sglang.lang.api import set_default_backend
from sglang.lang.backend.runtime_endpoint import RuntimeEndpoint
from sglang.utils import download_and_cache_file, dump_state_text, read_jsonl
from sglang.utils import download_and_cache_file, read_jsonl
INVALID = -9999999
......
......@@ -18,7 +18,6 @@ from sglang.test.simple_eval_common import (
HTML_JINJA,
Eval,
EvalResult,
MessageList,
SamplerBase,
SingleEvalResult,
format_multichoice_question,
......
......@@ -11,8 +11,6 @@ import re
from concurrent.futures import ThreadPoolExecutor, as_completed
from typing import Dict, List, Optional
import tqdm
try:
from human_eval.data import read_problems
from human_eval.evaluation import estimate_pass_at_k
......@@ -41,7 +39,6 @@ def evaluate_functional_correctness(
Evaluates the functional correctness of generated samples, and writes
results to f"{sample_file}_results.jsonl.gz"
"""
import copy
# Check the generated samples against test suites.
with ThreadPoolExecutor(max_workers=n_workers) as executor:
......
import itertools
import os
import unittest
import torch
......@@ -577,7 +576,7 @@ class TestW8A8BlockFP8BatchedDeepGemm(CustomTestCase):
if not torch.cuda.is_available():
raise unittest.SkipTest("CUDA is not available")
try:
import deep_gemm
import deep_gemm # noqa: F401
except ImportError:
raise unittest.SkipTest("DeepGEMM is not available")
torch.set_default_device("cuda")
......
import itertools
import os
import unittest
from typing import List, Tuple
......
import argparse
import time
import torch
import triton # Added import
......
# SPDX-License-Identifier: Apache-2.0
from typing import Literal, Optional
from typing import Optional
import pytest
import torch
......
import types
from typing import Optional
import pytest
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment