Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix various things about the benchmarks for Windows. Make Windows a n…
…on-experimental platform in CI
  • Loading branch information
mdboom committed Oct 25, 2024
commit b0941795e886710ead09baa2540f56776cd8421b
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
experimental: true
- os: windows-latest
python: "3.13"
experimental: true
experimental: false
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
Expand Down
2 changes: 2 additions & 0 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
Changelog
=========

* Bump dask[distributed] to 2024.10.1 for Windows compatibility
* Bump greenlet to 3.1.0 for compatibility with 3.13
* Bump tornado to 6.2.0

Version 1.11.0 (2024-03-09)
--------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import pyperf
import websockets.server
import websockets.client
import websockets.exceptions
import asyncio

CHUNK_SIZE = 1024 ** 2
Expand All @@ -23,13 +24,20 @@ async def handler(websocket) -> None:
stop.set()


async def send(ws):
try:
await ws.send(DATA)
except websockets.exceptions.ConnectionClosedOK:
Comment thread
kumaraditya303 marked this conversation as resolved.
pass


async def main() -> None:
global stop
t0 = pyperf.perf_counter()
stop = asyncio.Event()
async with websockets.server.serve(handler, "", 8001):
async with websockets.client.connect("ws://localhost:8001") as ws:
await asyncio.gather(*[ws.send(DATA) for _ in range(100)])
await asyncio.gather(*[send(ws) for _ in range(100)])
await stop.wait()
return pyperf.perf_counter() - t0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def train(data: str):

def bench_bpe_tokeniser(loops: int) -> float:
DATA = Path(__file__).parent / "data" / "frankenstein_intro.txt"
with open(DATA, "r") as f:
with open(DATA, "r", encoding="utf8") as f:
data = f.read()

range_it = range(loops)
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dask[distributed]==2022.2.0
dask[distributed]==2024.10.0
3 changes: 0 additions & 3 deletions pyperformance/data-files/benchmarks/bm_dask/run_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ async def benchmark():


if __name__ == "__main__":
if distributed.__version__ <= "2024.5.0" and sys.version_info >= (3, 13) and sys.platform == "win32":
raise RuntimeError("Benchmark doesn't work with Python 3.13 on Windows")

runner = pyperf.Runner()
runner.metadata['description'] = "Benchmark dask"
runner.bench_async_func('dask', benchmark)
Original file line number Diff line number Diff line change
@@ -1 +1 @@
tornado==6.1
tornado==6.2