Skip to content

Pin a Python 3.16-compatible cloudpickle for the dask benchmark #518

Open

Description

@sendaoYan

Summary

bm_dask pins dask[distributed]==2024.10.0, but cloudpickle is only a
transitive dependency (cloudpickle >=3.0.0). On Python 3.16, which removed the
DELETE_GLOBAL opcode, cloudpickle < 3.1.3 raises KeyError: 'DELETE_GLOBAL'
at import time, so the dask benchmark fails:

ERROR: Benchmark dask failed: Benchmark died
KeyError: 'DELETE_GLOBAL'

cloudpickle 3.1.3 (released 2026-11-18) fixes this
(cloudpipe/cloudpickle#599), and new environments resolve to it. However, an
existing benchmark venv that already has cloudpickle 3.1.2 is not upgraded:
ensure_reqs installs with upgrade=False, and 3.1.2 satisfies >=3.0.0.

How to reproduce

With cloudpickle 3.1.2 in the benchmark venv:

python -m pyperformance run -b dask -f -o /tmp/dask.json
# KeyError: 'DELETE_GLOBAL'

python -m pip install -U 'cloudpickle>=3.1.3'
python -m pyperformance run -b dask -f -o /tmp/dask.json
# passes

Proposed fix

Pin cloudpickle explicitly in
pyperformance/data-files/benchmarks/bm_dask/requirements.txt:

dask[distributed]==2024.10.0
cloudpickle==3.1.3

This makes the benchmark deterministic for both fresh and existing venvs, and
matches how the other benchmark requirements are pinned. cloudpickle 3.1.3
requires Python >=3.8, so it is compatible with all supported versions.

Environment

  • pyperformance 1.14.0 (main at 8a0713c)
  • Python 3.16.0a2+dev
  • dask 2024.10.0, cloudpickle 3.1.2 (fails) / 3.1.3 (passes)

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions