Skip to content

Pass the trial queue to sampler callbacks - #305

Closed
c-bata wants to merge 1 commit into
optuna:mainfrom
c-bata:expose-trial-queue-through-sampler-context-2
Closed

c-bata wants to merge 1 commit into
optuna:mainfrom
c-bata:expose-trial-queue-through-sampler-context-2

Conversation

@c-bata

@c-bata c-bata commented Nov 5, 2026

Copy link
Copy Markdown
Member

An alternative approach for #304.

Instead of exposing trial_queue on SamplerContext, pass the study's shared trial queue directly to each sampler callback: before_trial, sample_joint, sample_independent, and after_trial. SamplerContext remains limited to study and trial metadata.

@c-bata
c-bata force-pushed the expose-trial-queue-through-sampler-context-2 branch from 1f121fa to 3870b6f Compare November 5, 2026 04:26
@c-bata c-bata closed this Nov 12, 2026
@c-bata
c-bata deleted the expose-trial-queue-through-sampler-context-2 branch November 12, 2026 03:29
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.

1 participant