Skip to content

[dynamo] Use Variable Builder to build the property fget object#165683

Closed
anijain2305 wants to merge 2 commits intogh/anijain2305/911/basefrom
gh/anijain2305/911/head
Closed

[dynamo] Use Variable Builder to build the property fget object#165683
anijain2305 wants to merge 2 commits intogh/anijain2305/911/basefrom
gh/anijain2305/911/head

Conversation

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 16, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/165683

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 37ffd69 with merge base d61a9b8 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

anijain2305 added a commit that referenced this pull request Oct 16, 2025
@anijain2305 anijain2305 added ciflow/trunk Trigger trunk jobs on your pull request topic: not user facing topic category labels Oct 16, 2025
@anijain2305 anijain2305 requested review from Lucaskabela, ezyang and williamwen42 and removed request for ezyang October 16, 2025 21:06
Copy link
Contributor

@ezyang ezyang left a comment

Choose a reason for hiding this comment

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

Thanks can you also check functools.partial works?

Copy link

@ruomingp ruomingp left a comment

Choose a reason for hiding this comment

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

Thanks for the quick fix!

Comment on lines +1461 to +1462
fget_vt = VariableTracker.build(tx, subobj.fget, source=source)
return fget_vt.call_function(tx, [self], {})

Choose a reason for hiding this comment

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

Does this also work with functools.partial?

Choose a reason for hiding this comment

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

UserFunctionVariable is also used in a few other places: https://github.com/search?q=repo%3Apytorch%2Fpytorch+UserFunctionVariable%28&type=code. Do we have a similar issue in some of those?

Copy link
Contributor Author

@anijain2305 anijain2305 Oct 16, 2025

Choose a reason for hiding this comment

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

Yes, we need an audit of other places, where we should directly use the variable builder. I will do that.

I will add a test for the functools.partial in the followup PR.

Update - Added the functools.partial test

…bject"

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames Lucaskabela

[ghstack-poisoned]
anijain2305 added a commit that referenced this pull request Oct 16, 2025
@anijain2305
Copy link
Contributor Author

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Collaborator

The merge job was canceled or timed out. This most often happen if two merge requests were issued for the same PR, or if merge job was waiting for more than 6 hours for tests to finish. In later case, please do not hesitate to reissue the merge command
For more information see pytorch-bot wiki.

@anijain2305
Copy link
Contributor Author

@pytorchbot merge

@anijain2305
Copy link
Contributor Author

@pytorchbot merge -f "stuck merge job"

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

pytorchmergebot pushed a commit that referenced this pull request Oct 17, 2025
…ker build (#165706)

Audit: To prevent future issues with functools.partial or callable
objects.

Pull Request resolved: #165706
Approved by: https://github.com/Lucaskabela
ghstack dependencies: #165683
pytorchmergebot pushed a commit that referenced this pull request Oct 17, 2025
#165707)

Audit: To prevent future issues with functools.partial or callable
objects.

Pull Request resolved: #165707
Approved by: https://github.com/Lucaskabela
ghstack dependencies: #165683, #165706
Chao1Han pushed a commit to Chao1Han/pytorch that referenced this pull request Oct 21, 2025
…ker build (pytorch#165706)

Audit: To prevent future issues with functools.partial or callable
objects.

Pull Request resolved: pytorch#165706
Approved by: https://github.com/Lucaskabela
ghstack dependencies: pytorch#165683
Chao1Han pushed a commit to Chao1Han/pytorch that referenced this pull request Oct 21, 2025
pytorch#165707)

Audit: To prevent future issues with functools.partial or callable
objects.

Pull Request resolved: pytorch#165707
Approved by: https://github.com/Lucaskabela
ghstack dependencies: pytorch#165683, pytorch#165706
zhudada0120 pushed a commit to zhudada0120/pytorch that referenced this pull request Oct 22, 2025
…ker build (pytorch#165706)

Audit: To prevent future issues with functools.partial or callable
objects.

Pull Request resolved: pytorch#165706
Approved by: https://github.com/Lucaskabela
ghstack dependencies: pytorch#165683
zhudada0120 pushed a commit to zhudada0120/pytorch that referenced this pull request Oct 22, 2025
pytorch#165707)

Audit: To prevent future issues with functools.partial or callable
objects.

Pull Request resolved: pytorch#165707
Approved by: https://github.com/Lucaskabela
ghstack dependencies: pytorch#165683, pytorch#165706
@github-actions github-actions bot deleted the gh/anijain2305/911/head branch November 17, 2025 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants