Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[JIT] resolve ignored module method type annotations#26683

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed

Conversation

@eellison
Copy link
Contributor

Previously we weren't passing an rcb around, causing NamedTuples with@unused methods to fail.

unused reacted with eyes emoji
@pytorchbotpytorchbot added oncall: jitAdd this issue/PR to JIT oncall triage queue module: pybindRelated to our Python bindings / interactions with other Python libraries labelsSep 23, 2019
py::bool_ isMethod =py::module::import("inspect").attr("ismethod")(obj);
// methods here have been explicitly annotated to not be compiled,
// so they do not have the same overload and compile checks as for functions
if (isFunction || isMethod) {
Copy link
Contributor

Choose a reason for hiding this comment

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

You can also doif (PyCallable_Check(obj.ptr())) and avoid the extrainspect call

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Wouldn't that give a false positive for something that has a__call__ function ?

driazati reacted with thumbs up emoji
Copy link
Contributor

@facebook-github-botfacebook-github-bot left a comment

Choose a reason for hiding this comment

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

@eellison has imported this pull request. If you are a Facebook employee, you can view this diffon Phabricator.

@facebook-github-bot
Copy link
Contributor

@eellison merged this pull request inefaa65d.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@facebook-github-botfacebook-github-botfacebook-github-bot left review comments

@apaszkeapaszkeAwaiting requested review from apaszke

+1 more reviewer

@driazatidriazatidriazati approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

Mergedmodule: pybindRelated to our Python bindings / interactions with other Python librariesoncall: jitAdd this issue/PR to JIT oncall triage queue

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@eellison@facebook-github-bot@driazati@pytorchbot@mruberry

[8]ページ先頭

©2009-2025 Movatter.jp