Skip to content

Update docstrings of _get_best_trial to follow coding conventions.#6122

Merged
y0z merged 1 commit intooptuna:masterfrom
toshihikoyanase:follow-up-6119
Jun 5, 2025
Merged

Update docstrings of _get_best_trial to follow coding conventions.#6122
y0z merged 1 commit intooptuna:masterfrom
toshihikoyanase:follow-up-6119

Conversation

@toshihikoyanase
Copy link
Copy Markdown
Member

Motivation

This is a follow-up PR for #6119.
I think this is optional since the _get_best_trial docstring is not rendered in a reference.

Description of the changes

  • Updated the docstring to follow the existing code base, such as
    deepcopy:
    Flag to control whether to apply ``copy.deepcopy()`` to the trials.
    Note that if you set the flag to :obj:`False`, you shouldn't mutate
    any fields of the returned trial. Otherwise the internal state of
    the study may corrupt and unexpected behavior may happen.
    states:
    Trial states to filter on. If :obj:`None`, include all states.
    Returns:
    A list of :class:`~optuna.trial.FrozenTrial` objects.

@toshihikoyanase toshihikoyanase added the document Documentation related. label Jun 3, 2025
Copy link
Copy Markdown
Member

@y0z y0z left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@y0z
Copy link
Copy Markdown
Member

y0z commented Jun 4, 2025

@sawa3030 Could you review this PR?

Copy link
Copy Markdown
Collaborator

@sawa3030 sawa3030 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@y0z y0z merged commit 0817ae3 into optuna:master Jun 5, 2025
15 checks passed
@y0z y0z added this to the v4.4.0 milestone Jun 5, 2025
@toshihikoyanase toshihikoyanase deleted the follow-up-6119 branch June 5, 2025 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

document Documentation related.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants