Skip to content

Score categorical TPE candidates in batches of four - #282

Open
y0z wants to merge 1 commit into
mainfrom
perf/issue-271-batch-scoring
Open

y0z wants to merge 1 commit into
mainfrom
perf/issue-271-batch-scoring

Conversation

@y0z

@y0z y0z commented Oct 15, 2026

Copy link
Copy Markdown
Member

Score categorical TPE candidates in batches of four, reusing each observed category index across candidate scores while preserving per-candidate addition order and mixture normalization. Models containing numerical parameters continue to use per-candidate evaluation.

A local macOS aarch64 benchmark showed essentially unchanged runtime (10.095 s vs. 10.140 s median); the reported speedup remains unconfirmed on this platform.

Closes #271.

Original implementation by @tkng, cherry-picked from 2e0ce80 without code changes, preserving the original commit author.

… scoring

Score categorical candidates in groups of four. Read each observed category
index once per group and use it to update four separate candidate scores.
This reduces repeated scans of the model's observation buffers while
preserving each candidate's addition order and mixture normalization.
@y0z
y0z marked this pull request as ready for review October 15, 2026 07:48
@y0z

y0z commented Oct 15, 2026

Copy link
Copy Markdown
Member Author

I was unable to reproduce the performance improvement in my environment (nor did I observe any significant performance degradation).

Since the implementation would become somewhat more complex, I am not sure whether this change should be adopted.

@c-bata Are you able to reproduce this performance improvement in your environment?

@tkng

tkng commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

I also confirmed that commit 2e0ce80 does not improve performance. While I do not think the concern raised in issue #271 is entirely off the mark, the sample implementation lacked thorough verification and fell short of the quality standard expected for submission. I sincerely apologize for this.

I would like to withdraw issue #271.

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multivariate TPE likelihood evaluation rereads observation indices for each candidate

2 participants