• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

PrincetonUniversity / PsyNeuLink / 25532019955
84%
master: 85%

Build:
Build:
LAST BUILD BRANCH: devel
DEFAULT BRANCH: master
Ran 08 May 2026 02:55AM UTC
Jobs 1
Files 163
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

08 May 2026 01:47AM UTC coverage: 84.216% (-0.002%) from 84.218%
25532019955

Pull #3535

github

younesStrittmatter
OneHot: fix PROB/PROB_INDICATOR sampling at the cumsum-rounding boundary

cum_sum[-1] of a softmax output can drift just below 1.0 due to float
rounding (e.g. np.cumsum([0.7, 0.2, 0.1])[-1] == 0.9999999999999999) while
random_state.uniform() draws from [0, 1). When the draw lands in the
(cum_sum[-1], 1.0) gap:

  * the Python path raised StopIteration from
        next(element for element in cum_sum if element > random_value)
  * the LLVM path silently produced an all-zero output (no bucket's
        sum_old <= random_draw < sum_new condition fired)

Both paths now fall back to the last index in that case. The Python path
also indexes by position rather than matching cum_sum entries by equality,
which fixes a separate bug where prob_dist values of 0 produced duplicate
cum_sum entries and selected multiple indices simultaneously.

Two SOFT_MAX MASK_THRESHOLD PROB test expectations encoded the equality-
match bug (two non-zero entries instead of one) and have been corrected
to a single chosen sample.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pull Request #3535: OneHot: fix PROB sampling at the cumsum-rounding boundary

10520 of 13698 branches covered (76.8%)

Branch coverage included in aggregate %.

6 of 6 new or added lines in 1 file covered. (100.0%)

2 existing lines in 1 file now uncovered.

36186 of 41762 relevant lines covered (86.65%)

0.87 hits per line

Coverage Regressions

Lines Coverage ∆ File
2
84.3
-0.58% psyneulink/core/components/mechanisms/modulatory/learning/learningmechanism.py
Jobs
ID Job ID Ran Files Coverage
1 25532019955.1 08 May 2026 02:55AM UTC 163
84.22
GitHub Action Run
Source Files on build 25532019955
  • Tree
  • List 163
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Pull Request #3535
  • PR Base - devel (#25497910489)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc