Skip to content

Add refactor changes on study.ask() - #300

Merged
c-bata merged 1 commit into
mainfrom
refactor-study-ask
Nov 2, 2026
Merged

c-bata merged 1 commit into
mainfrom
refactor-study-ask

Conversation

@c-bata

@c-bata c-bata commented Oct 30, 2026

Copy link
Copy Markdown
Member

Follow-up #299

Description of the changes

Simplify Study::ask() by passing a PersistedTrial directly to Trial::new(), replacing the tuple of metadata and attributes. Initialize fixed parameters and cached user attributes in the constructor, and restrict its visibility to pub(crate) since trials are created through Study::ask().

Also use expect() for the storage and queue locks touched by this refactor, treating poisoning as a panic. Storage operation errors continue to propagate, with queued trials restored on failure.

@c-bata
c-bata marked this pull request as ready for review November 2, 2026 04:22
@c-bata
c-bata merged commit 259f11e into main Nov 2, 2026
10 checks passed
@c-bata
c-bata deleted the refactor-study-ask branch November 2, 2026 04:22
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