style: fix ruff lint warnings

- Remove unused local variable b in attention_backend.py
- Remove unused variable rank0_sd in test_broadcast_state_dict.py
- Remove unused imports across test files
This commit is contained in:
2026-08-07 14:17:48 +08:00
parent ef1bb6f401
commit 55ee258e95
6 changed files with 1 additions and 10 deletions
-1
View File
@@ -5,7 +5,6 @@ import torch
from astrai.config.model_config import AutoRegressiveLMConfig
from astrai.model.transformer import AutoRegressiveLM
from tests.conftest import skip_no_kernel
D = 64
CFG = dict(
-1
View File
@@ -10,7 +10,6 @@ from astrai.extension import (
ATTN_BACKEND,
AttentionBackendFactory,
CudaBackend,
TorchNativeBackend,
attn_backend,
get_backend,
)
@@ -31,7 +31,6 @@ def test_training_forward_matches_torch(cuda_model):
or non-bf16 inputs it falls back to torch SDPA. Verify the fallback
path matches the torch-native forward exactly.
"""
import pytest
model, _ = cuda_model
input_ids = torch.randint(0, 1000, (2, 16), device="cuda")