Skip to content

ydf: add version 0.16.1 - #2416

Merged
luhenry merged 4 commits into
mainfrom
ydf
Sep 29, 2026
Merged

luhenry merged 4 commits into
mainfrom
ydf

Conversation

@luhenry

@luhenry luhenry commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Compiles YDF's pybind11 extension over the Yggdrasil Decision Forests C++ library (Random Forest, GBT, CART, isolation forest training/serving). Upstream publishes no riscv64 wheel.

Mirrors upstream's own release recipe: build_test_linux.sh and package_linux.sh.

Differs from upstream

  • Bootstraps bazel from source - the release image's bazelisk has no riscv64 binary to fetch.
  • Patches rules_python's pip extension - a transitive protobuf/googletest pip hub declares a CPython 3.8 interpreter python-build-standalone doesn't publish for riscv64.
  • Installs numpy/protobuf from pypi.riseproject.dev - no riscv64 wheels exist on public PyPI.

Matrix: cp312/cp313/cp314 - upstream itself ships no cp314t wheel or free-threading support.

Testing

  • same as upstream's release smoke test (package_linux.sh's test_package): installs the wheel and runs examples/minimal.py end to end (train, evaluate, save, reload, predict).

License: Wheel bundles abseil-cpp, protobuf, grpc, boringssl, highway, google_cloud_cpp, pybind11 and other statically-linked C++ deps, all permissively licensed (Apache-2.0/BSD/MIT); upstream ships no licence text for them, so the build adds it.

CI running on this PR; will update with build results.

Ports google/yggdrasil-decision-forests' pip-installable `ydf` package.
Upstream tags no releases; pin the "[YDF] Release PYDF 0.16.1" commit.
Bootstraps bazel from source (no riscv64 bazel binary exists) and drives
upstream's own build_test_linux.sh/package_linux.sh recipe: bzlmod build
of the pybind11 extension (abseil, protobuf, grpc, boringssl, highway,
google_cloud_cpp among the statically-linked deps), collect_pip_files.py,
`python -m build`, then auditwheel repair. TensorFlow is only an optional
runtime extra (`ydf-tf`), not needed here; the Highway-based SIMD kernel
already dispatches to a portable scalar target with no forced AVX2.
luhenry added a commit that referenced this pull request Sep 28, 2026
@luhenry
luhenry marked this pull request as draft September 28, 2026 07:18
@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-09-29 07:51 UTC

com_google_highway's BUILD.bazel unconditionally adds the Clang-only
-menable-experimental-extensions copt on riscv64 (gotcha 567); gcc 14.3.1
in the manylinux_2_39_riscv64 image rejects it. Bazel's local toolchain
autodetection defaults to gcc unless CC/CXX are exported before the
build, so install clang+lld and export them ahead of the bazel invocation.
cp314 built cleanly after ~6.5h (gotcha 567's clang fix held) and then
segfaulted in pybind11_protobuf's proto_caster_load_impl during upstream's
own examples/minimal.py smoke test. ydf 0.16.1 ships no cp314 wheel on any
platform, its own setup.py classifiers stop at 3.13, and upstream's own CI
matrix is a single '3.12' entry marked "Currently unused" -- there is no
upstream cp314 support to chase this against (gotcha 614).
The bundled license for the pybind11 integration is collected from the
bazel external repo named pybind11_protobuf (pybind11_bazel is a
separate, header-only shim that is intentionally skipped), so the
wheel never ships a LICENSE.pybind11 file. The test smoke script was
still asserting the old name, causing a bare AssertionError after an
otherwise fully successful build, train, eval and inference run.
@luhenry
luhenry marked this pull request as ready for review September 29, 2026 06:17
luhenry added a commit that referenced this pull request Sep 29, 2026
@luhenry
luhenry merged commit 0f04f9a into main Sep 29, 2026
10 checks passed
@luhenry
luhenry deleted the ydf branch September 29, 2026 07:45
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