Skip to content

grain: Add version 0.2.18 - #2124

Merged
luhenry merged 7 commits into
mainfrom
grain
Sep 20, 2026
Merged

luhenry merged 7 commits into
mainfrom
grain

Conversation

@luhenry

@luhenry luhenry commented Sep 20, 2026 •

Copy link
Copy Markdown
Member

Bazel builds one pybind11 extension (index_shuffle, statically linking Abseil) and a generated protobuf module. Upstream publishes no riscv64 wheel.

Mirrors upstream's build_and_publish_template.yml and grain/oss/build_whl.sh.

Differs from upstream

  • bazel 7.5.0 bootstrapped from the dist archive - the bazel releases carry no riscv64 binary
  • builds the three wheel-producing targets, not ... - ... needs the @pypi hub, whose lock pins jaxlib and scipy wheels that exist for no riscv64 and ship no sdist
  • adds LICENSE.abseil-cpp and LICENSE.pybind11 - both are statically linked and upstream ships neither

Matrix: cp312/cp313/cp314 - array-record has no cp311 riscv64 wheel, and upstream publishes no free-threaded build

Testing

  • each test file runs as its own process, as upstream's py_test targets do
  • 7 files dropped for needing jax or tensorflow, neither of which builds for riscv64
  • multiprocessing_test.py dropped - upstream declares no test target for it and its __main__ calls an undefined name

License: Wheel bundles statically linked Abseil (Apache-2.0) and pybind11 (BSD-3-Clause); upstream ships no licence text for either, so the build adds it.

Bazel build of grain's pybind11 extension (index_shuffle) and its
execution_summary proto, mirroring upstream's build_whl.sh with the bazel
binary bootstrapped from source, since the bazel releases carry no riscv64
build.

Upstream's `bazel build ...` cannot be used: it pulls the @pypi hub, whose
lock pins jaxlib and scipy wheels that exist for no riscv64 and ship no
sdist, so only the three targets whose output reaches the wheel are built.

Tests run each file as its own process the way upstream's py_test targets
do; collecting them into one pytest process leaks state between files.
luhenry added a commit that referenced this pull request Sep 20, 2026
autotune_test.py uses plain unittest.main() and exits on "unrecognized
arguments: --test_srcdir", so the flag goes only to the three targets whose
py_test rules declare it.

batch_test.py needs jax: 11 of its cases read sys.modules["jax"] without
importing it at module level, and its py_test declares @pypi//jax:pkg.
…arrow

grain/_src/python/ipc/queue.py shadows the stdlib queue whenever its own
directory is sys.path[0], which is what running a test by path does:
queue_test and variable_size_queue_test both died on "partially initialized
module 'queue'". Bazel puts the runfiles root on sys.path instead, so invoking
each test as a module reproduces its import environment.

dataset_test goes through pytest so that the RUN_IN_PYTEST expectedFailure
grain ships applies; both of its execution-summary tests wait on a
summary-logging thread that only reports under upstream's own runner.
luhenry added a commit that referenced this pull request Sep 20, 2026
@github-actions

github-actions Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-09-20 16:05 UTC

The interpreter legs were introduced only through `include:` entries on a
matrix whose sole dimension was `version`. GitHub adds an include object's
keys to the existing combinations instead of creating one job per entry, so
the three entries overwrote each other's `tag`/`python` and a single job ran
with cp314's values - run 35492217884 is green with one `build_wheels` job,
`Build grain 0.2.18 cp314-manylinux_riscv64`, and no cp312/cp313 wheel.

Making `tag` a real dimension crossed with `version` restores one job per
interpreter; the include entries now match an existing combination and only
add `python` to it.
@luhenry
luhenry merged commit 068a113 into main Sep 20, 2026
12 checks passed
@luhenry
luhenry deleted the grain branch September 20, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant