Skip to content

Update TYPE_CHECKING for optuna/_gp/gp.py#6090

Merged
nabenabe0928 merged 2 commits intooptuna:masterfrom
Samarthi:master
May 26, 2025
Merged

Update TYPE_CHECKING for optuna/_gp/gp.py#6090
nabenabe0928 merged 2 commits intooptuna:masterfrom
Samarthi:master

Conversation

@Samarthi
Copy link
Copy Markdown
Contributor

Motivation

This PR relates to:

Description of the changes

  • Fix TYPE_CHECKING for optuna/_gp/gp.py

@nabenabe0928 nabenabe0928 added the code-fix Change that does not change the behavior, such as code refactoring. label May 24, 2025
@nabenabe0928 nabenabe0928 added this to the v4.4.0 milestone May 24, 2025
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you remove the double quotations from these lines?

def default_log_prior(kernel_params: "gp.KernelParamsTensor") -> "torch.Tensor":
# Log of prior distribution of kernel parameters.
def gamma_log_prior(x: "torch.Tensor", concentration: float, rate: float) -> "torch.Tensor":

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, on it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I see there's a test failing. I'll look into it tomorrow.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No worries, the fail doesn't relate to your change!
I reran the CI:)

@nabenabe0928 nabenabe0928 merged commit e1e30e7 into optuna:master May 26, 2025
15 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code-fix Change that does not change the behavior, such as code refactoring.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants