Skip to content

Replace Union with | syntax in root_mean_squared_error.py#3484

Merged
vfdev-5 merged 1 commit intopytorch:masterfrom
JonSnow1807:refactor-typing-root-mean-squared-error
Jan 15, 2026
Merged

Replace Union with | syntax in root_mean_squared_error.py#3484
vfdev-5 merged 1 commit intopytorch:masterfrom
JonSnow1807:refactor-typing-root-mean-squared-error

Conversation

@JonSnow1807
Copy link
Copy Markdown
Contributor

Summary

  • Replace Union[torch.Tensor, float] with torch.Tensor | float
  • Remove unused from typing import Union import

Part of #3481

Test plan

  • Existing tests pass (25 passed)
  • Import check verified

  Part of pytorch#3481: Update typing hints to use Python 3.10+ syntax.
@github-actions github-actions bot added the module: metrics Metrics module label Jan 15, 2026
@vfdev-5
Copy link
Copy Markdown
Collaborator

vfdev-5 commented Jan 15, 2026

Thanks for the PR @JonSnow1807
Let's see whether CI would be happy with this change

@vfdev-5 vfdev-5 added this pull request to the merge queue Jan 15, 2026
Merged via the queue into pytorch:master with commit bfe951f Jan 15, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: metrics Metrics module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants