Skip to content

Commit a6d3149

Browse files
committed
Add CI workflow and backend improvements
- Add GitHub Actions workflow for Ruff linting - Update .gitignore - Improve opinfo_suite.py - Enhance scripts/main.py
1 parent a91908a commit a6d3149

File tree

4 files changed

+27
-3
lines changed

4 files changed

+27
-3
lines changed

.github/workflows/ruff.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Ruff
2+
3+
on:
4+
push:
5+
jobs:
6+
ruff:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
11+
- name: Set up Python
12+
uses: actions/setup-python@v4
13+
with:
14+
python-version: '3.x'
15+
16+
- name: Install ruff
17+
run: pip install ruff==0.12.1
18+
19+
- name: Run ruff check
20+
run: ruff check .
21+
22+
- name: Run ruff format check
23+
run: ruff format --check .

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
__pycache__/
2+
.claude/
3+
.vscode/
4+
.ruff_cache/

BackendBench/opinfo_suite.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import logging
22
from collections import defaultdict
33

4-
import torch
54
from torch.testing._internal.common_methods_invocations import op_db
65
from torch.utils._python_dispatch import TorchDispatchMode
76

87
from .eval import allclose
9-
from .suite import OpTest, Test, TestSuite
8+
from .suite import OpTest, TestSuite
109

1110
logger = logging.getLogger(__name__)
1211

scripts/main.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import logging
2-
import sys
32

43
import BackendBench.backends as backends
54
import BackendBench.eval as eval

0 commit comments

Comments
 (0)