You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opennlp.apache.org by GitBox <gi...@apache.org> on 2026/09/01 02:59:58 UTC

[GH] (opennlp/2.x-OPENNLP-1903): Workflow run "Java CI" failed!

The GitHub Actions job "Java CI" on opennlp.git/2.x-OPENNLP-1903 has failed.
Run started by GitHub user krickert (triggered by krickert).

Head commit for run:
bfed8c2d21c808092417ab40f480f896cb0e14cf / Kristian Rickert <kr...@gmail.com>
[2.x] OPENNLP-1903: Replace per-candidate Sequence copies with chain nodes in BeamSearch

* OPENNLP-1903: Replace per-candidate Sequence copies with chain nodes in BeamSearch

Expanding a beam candidate copied the parent's entire outcome and
probability lists (new Sequence(top, out, p)), and each pop copied them
again via getOutcomes() (List.copyOf) and toArray(). That is
O(beamSize * outcomes * n^2) transient copies per document, which
saturates memory write bandwidth: throughput plateaus at ~2x scaling on
4-core ARM and at ~8 cores' worth of CPU on a 32-core x86 machine,
regardless of offered concurrency or process split.

Introduce a private immutable SearchNode chain inside bestSequences:
child expansion becomes O(1), the outcome array is materialized lazily
once per node, and only the winning sequences are converted to public
Sequence objects. Score accumulation and queue ordering are
bit-identical; no public API changes.

Backport of #1205 to opennlp-2.x. SearchNode orders by score alone, as Sequence did, so tied candidates come out as before; the canonical tie-break and its test stay on 3.0 as a behavior change. The concurrent equivalence test is left out: it relies on the per-call search state of OPENNLP-1816, which 2.x does not have, and BeamSearch stays as thread-unsafe as before on 2.x. The cache now stores copies of the eval scores, as on main.

Report URL: https://github.com/apache/opennlp/actions/runs/33464551357

With regards,
GitHub Actions via GitBox