Skip to content

Commit d5f088e

Browse files
authored
Upgrade dev dependencies due to mypy 1.10 issue with latest transformers release (#141)
1 parent 61205f8 commit d5f088e

34 files changed

+159
-171
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ repos:
55
- id: trailing-whitespace
66
- id: end-of-file-fixer
77
- repo: https://github.com/astral-sh/ruff-pre-commit
8-
rev: v0.5.2
8+
rev: v0.11.7
99
hooks:
1010
- id: ruff
1111
- repo: https://github.com/pre-commit/mirrors-mypy
12-
rev: v1.10.1
12+
rev: v1.15.0
1313
hooks:
1414
- id: mypy
1515
args: [--check-untyped-defs]

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ dev = [
8181
"respx~=0.22.0",
8282

8383
# code quality
84-
"mypy~=1.10.1",
85-
"ruff~=0.5.2",
84+
"mypy~=1.15.0",
85+
"ruff~=0.11.7",
8686

8787
# docs quality
8888
"mdformat~=0.7.17",
@@ -147,10 +147,10 @@ indent-style = "space"
147147
[tool.ruff.lint]
148148
ignore = [
149149
"PLR0913",
150-
"TCH001",
150+
"TC001",
151151
"COM812",
152152
"ISC001",
153-
"TCH002",
153+
"TC002",
154154
"PLW1514", # allow Path.open without encoding
155155
"RET505", # allow `else` blocks
156156
"RET506", # allow `else` blocks

src/guidellm/__init__.py

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,12 @@
33
evaluating and benchmarking large language models (LLMs).
44
"""
55

6-
# flake8: noqa
7-
8-
import os
9-
import logging
106
import contextlib
11-
7+
import logging
8+
import os
129

1310
with (
14-
open(os.devnull, "w") as devnull,
11+
open(os.devnull, "w") as devnull, # noqa: PTH123
1512
contextlib.redirect_stderr(devnull),
1613
contextlib.redirect_stdout(devnull),
1714
):
@@ -24,28 +21,26 @@
2421
logging.getLogger("transformers").setLevel(logging.ERROR)
2522

2623
from .config import (
27-
settings,
2824
DatasetSettings,
2925
Environment,
3026
LoggingSettings,
3127
OpenAISettings,
32-
print_config,
3328
Settings,
29+
print_config,
3430
reload_settings,
31+
settings,
3532
)
3633
from .logger import configure_logger, logger
3734

3835
__all__ = [
39-
# Config
4036
"DatasetSettings",
4137
"Environment",
4238
"LoggingSettings",
4339
"OpenAISettings",
44-
"print_config",
4540
"Settings",
41+
"configure_logger",
42+
"logger",
43+
"print_config",
4644
"reload_settings",
4745
"settings",
48-
# Logger
49-
"logger",
50-
"configure_logger",
5146
]

src/guidellm/backend/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
)
1212

1313
__all__ = [
14-
"StreamingResponseType",
15-
"StreamingTextResponse",
16-
"RequestArgs",
17-
"ResponseSummary",
14+
"CHAT_COMPLETIONS_PATH",
15+
"TEXT_COMPLETIONS_PATH",
1816
"Backend",
1917
"BackendType",
2018
"OpenAIHTTPBackend",
21-
"TEXT_COMPLETIONS_PATH",
22-
"CHAT_COMPLETIONS_PATH",
19+
"RequestArgs",
20+
"ResponseSummary",
21+
"StreamingResponseType",
22+
"StreamingTextResponse",
2323
]

src/guidellm/backend/openai.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
)
1818
from guidellm.config import settings
1919

20-
__all__ = ["OpenAIHTTPBackend", "TEXT_COMPLETIONS_PATH", "CHAT_COMPLETIONS_PATH"]
20+
__all__ = ["CHAT_COMPLETIONS_PATH", "TEXT_COMPLETIONS_PATH", "OpenAIHTTPBackend"]
2121

2222

2323
TEXT_COMPLETIONS_PATH = "/v1/completions"

src/guidellm/backend/response.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
from guidellm.objects.pydantic import StandardBaseModel
77

88
__all__ = [
9-
"StreamingResponseType",
10-
"StreamingTextResponse",
119
"RequestArgs",
1210
"ResponseSummary",
11+
"StreamingResponseType",
12+
"StreamingTextResponse",
1313
]
1414

1515

src/guidellm/benchmark/__init__.py

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -32,42 +32,35 @@
3232
)
3333

3434
__all__ = [
35-
# Aggregator
3635
"AggregatorT",
37-
"BenchmarkAggregator",
38-
"GenerativeBenchmarkAggregator",
39-
# Benchmark
36+
"AsyncProfile",
4037
"Benchmark",
38+
"BenchmarkAggregator",
4139
"BenchmarkArgs",
4240
"BenchmarkMetrics",
4341
"BenchmarkRunStats",
4442
"BenchmarkT",
45-
"GenerativeBenchmark",
46-
"GenerativeMetrics",
47-
"GenerativeTextErrorStats",
48-
"GenerativeTextResponseStats",
49-
"StatusBreakdown",
50-
# Benchmarker
5143
"Benchmarker",
44+
"BenchmarkerProgressDisplay",
5245
"BenchmarkerResult",
46+
"BenchmarkerTaskProgressState",
47+
"ConcurrentProfile",
48+
"GenerativeBenchmark",
49+
"GenerativeBenchmarkAggregator",
5350
"GenerativeBenchmarker",
54-
# Entry points
55-
"benchmark_generative_text",
56-
# Output
5751
"GenerativeBenchmarksConsole",
5852
"GenerativeBenchmarksReport",
59-
# Profile
60-
"AsyncProfile",
61-
"ConcurrentProfile",
53+
"GenerativeMetrics",
54+
"GenerativeTextBenchmarkerProgressDisplay",
55+
"GenerativeTextBenchmarkerTaskProgressState",
56+
"GenerativeTextErrorStats",
57+
"GenerativeTextResponseStats",
6258
"Profile",
6359
"ProfileType",
60+
"StatusBreakdown",
6461
"SweepProfile",
6562
"SynchronousProfile",
6663
"ThroughputProfile",
64+
"benchmark_generative_text",
6765
"create_profile",
68-
# Progress
69-
"BenchmarkerProgressDisplay",
70-
"BenchmarkerTaskProgressState",
71-
"GenerativeTextBenchmarkerProgressDisplay",
72-
"GenerativeTextBenchmarkerTaskProgressState",
7366
]

src/guidellm/benchmark/benchmark.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,16 @@
3434
)
3535

3636
__all__ = [
37-
"BenchmarkT",
38-
"StatusBreakdown",
39-
"BenchmarkArgs",
40-
"BenchmarkRunStats",
4137
"Benchmark",
38+
"BenchmarkArgs",
4239
"BenchmarkMetrics",
43-
"GenerativeTextResponseStats",
44-
"GenerativeTextErrorStats",
45-
"GenerativeMetrics",
40+
"BenchmarkRunStats",
41+
"BenchmarkT",
4642
"GenerativeBenchmark",
43+
"GenerativeMetrics",
44+
"GenerativeTextErrorStats",
45+
"GenerativeTextResponseStats",
46+
"StatusBreakdown",
4747
]
4848

4949

src/guidellm/benchmark/output.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
from guidellm.utils import Colors, split_text_list_by_length
3030

3131
__all__ = [
32-
"GenerativeBenchmarksReport",
3332
"GenerativeBenchmarksConsole",
33+
"GenerativeBenchmarksReport",
3434
]
3535

3636

src/guidellm/benchmark/profile.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
)
1818

1919
__all__ = [
20-
"ProfileType",
20+
"AsyncProfile",
21+
"ConcurrentProfile",
2122
"Profile",
23+
"ProfileType",
24+
"SweepProfile",
2225
"SynchronousProfile",
23-
"ConcurrentProfile",
2426
"ThroughputProfile",
25-
"AsyncProfile",
26-
"SweepProfile",
2727
"create_profile",
2828
]
2929

0 commit comments

Comments
 (0)