Skip to content

Remove version constraint for torch with Python 3.13#6233

Merged
c-bata merged 2 commits intooptuna:masterfrom
not522:torch-python-3.13
Aug 4, 2025
Merged

Remove version constraint for torch with Python 3.13#6233
c-bata merged 2 commits intooptuna:masterfrom
not522:torch-python-3.13

Conversation

@not522
Copy link
Copy Markdown
Member

@not522 not522 commented Aug 4, 2025

Motivation

PyTorch already supports Python 3.13.

Description of the changes

Remove version constraint for torch with Python 3.13.

@not522 not522 added the installation Installation and dependency. label Aug 4, 2025
@nabenabe0928
Copy link
Copy Markdown
Contributor

nabenabe0928 commented Aug 4, 2025

@c-bata Could you review this PR?

@nabenabe0928 nabenabe0928 assigned c-bata and unassigned kAIto47802 Aug 4, 2025
Copy link
Copy Markdown
Contributor

@nabenabe0928 nabenabe0928 left a comment

Choose a reason for hiding this comment

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

LGTM

I confirmed that the unit tests for Python 3.13 pass.
https://github.com/optuna/optuna/actions/runs/16712859130/job/47300680965?pr=6233

@nabenabe0928 nabenabe0928 removed their assignment Aug 4, 2025
Copy link
Copy Markdown
Member

@c-bata c-bata left a comment

Choose a reason for hiding this comment

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

@not522 Thank you for your pull request. Could you remove the following if statement block?

# TODO(gen740): Remove this after pytorch supports Python 3.13
if [ "${{ matrix.python-version }}" = "3.13" ] ; then
pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu
fi

Copy link
Copy Markdown
Member

@c-bata c-bata left a comment

Choose a reason for hiding this comment

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

LGTM!

@c-bata c-bata merged commit ea837d5 into optuna:master Aug 4, 2025
24 checks passed
@c-bata c-bata added this to the v4.5.0 milestone Aug 4, 2025
@not522 not522 deleted the torch-python-3.13 branch August 5, 2025 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

installation Installation and dependency.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants