Skip to content

fix(stubs): add torch.half dtype alias - #5365

Closed
mangeshraut712 wants to merge 2 commits into
meta:mainfrom
mangeshraut712:fix/torch-half-dtype-alias
Closed

mangeshraut712 wants to merge 2 commits into
meta:mainfrom
mangeshraut712:fix/torch-half-dtype-alias

Conversation

@mangeshraut712

@mangeshraut712 mangeshraut712 commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

torch.half was missing from the tensor-shapes Torch stubs even though it is a public alias of torch.float16. Add the alias beside the existing dtype aliases and a focused regression that checks runtime identity and dtype= use.

Fixes #5361

Test plan

  • Ruff format/check on changed files
  • New test_dtype_aliases.py for torch.half
  • CI (tensor-shapes / primer)

@meta-codesync

meta-codesync Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

This pull request has been imported. If you are a Meta employee, you can view this in D127482167. (Because this pull request was imported automatically, there will not be any future comments.)

@github-actions github-actions Bot added size/xs and removed size/xs labels Oct 25, 2026

@stroxler stroxler left a comment

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.

Review automatically exported from Phabricator review in Meta.

@meta-codesync meta-codesync Bot closed this in b0feebb Oct 26, 2026
@meta-codesync meta-codesync Bot added the Merged label Oct 26, 2026
@meta-codesync

meta-codesync Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

This pull request has been merged in b0feebb.

@mangeshraut712

Copy link
Copy Markdown
Contributor Author

Hey — CodeSync landed this on main with me as the commit author (thanks). GitHub still shows the PR as closed not merged (mergedAt is null), so it does not show up in is:merged search or contributor merge counts.

Could you mark CodeSync landings as merged on the GitHub side (or reopen + merge via GitHub) so external contributors get the PR merge credit? Same issue on #5365 #5373 #5367 #5369.

@mangeshraut712

Copy link
Copy Markdown
Contributor Author

Hi Pyrefly team,

Thank you for reviewing and landing the changes from my account, including #5365 and the related stub/fix PRs. The commits on main correctly credit mangeshraut712 as author.

I noticed that CodeSync closes the original PRs and adds the “Merged” label, but their GitHub merged status remains false. They therefore don’t appear in is:merged searches or counts based on GitHub-merged PRs.

An accurate public contribution record matters to me for portfolio and professional visibility. I’m not asking for a duplicate merge or any rewrite of history, only confirmation of the expected workflow and the recommended way for external contributors to reference these accepted changes.

Is closed-but-not-merged the normal outcome of CodeSync? If so, should I cite the landing commit and “Merged” label, or is there another preferred way?

Disclosure: I used AI assistance to draft this message. The submitted changes themselves were also produced with bot assistance.

Thanks for accepting the work and for any guidance.

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.

[tensor-shapes] torch.half dtype alias is missing from torch stubs

2 participants