Skip to content

Conversation

suo
Copy link
Member

@suo suo commented May 7, 2020

Stack from ghstack:

Before, reassigning a method in a module (like forward = _forward)
didn't work, because we look at the function object's name for our def
name when building AST. Mkae that overrideable to handle cases like
reassignment

Differential Revision: D21444535

Before, reassigning a method in a module (like `forward = _forward`)
didn't work, because we look at the function object's name for our def
name when building AST. Mkae that overrideable to handle cases like
reassignment

[ghstack-poisoned]
@suo suo requested a review from apaszke as a code owner May 7, 2020 03:48
suo added a commit that referenced this pull request May 7, 2020
Before, reassigning a method in a module (like `forward = _forward`)
didn't work, because we look at the function object's name for our def
name when building AST. Mkae that overrideable to handle cases like
reassignment

ghstack-source-id: cd41286
Pull Request resolved: #37994
@facebook-github-bot facebook-github-bot added the oncall: jit Add this issue/PR to JIT oncall triage queue label May 7, 2020
@dr-ci
Copy link

dr-ci bot commented May 7, 2020

💊 CI failures summary and remediations

As of commit fcaafde (more details on the Dr. CI page):


  • 1/1 failures possibly* introduced in this PR
    • 1/1 non-CircleCI failure(s)

ci.pytorch.org: 1 failed


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions on the GitHub issue tracker.

See how this bot performed.

This comment has been revised 5 times.

@suo suo requested review from eellison and zdevito May 7, 2020 06:55
Copy link
Contributor

@zdevito zdevito left a comment

Choose a reason for hiding this comment

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

Sounds good, one potential bug



def get_jit_def(fn, self_name=None):
def get_jit_def(fn, self_name=None, def_name_override=None):
Copy link
Contributor

Choose a reason for hiding this comment

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

def_name_override should probably not be optional or an override, but actually just the name to use everytime. It seems like otherwise, it will cause bugs when people don't realize the same thing this bug addresses: that this is the name of the field of this method. For instance frontend.py:136 is probably wrong too but wasn't caught in this change.

Before, reassigning a method in a module (like `forward = _forward`)
didn't work, because we look at the function object's name for our def
name when building AST. Mkae that overrideable to handle cases like
reassignment

Differential Revision: [D21444535](https://our.internmc.facebook.com/intern/diff/D21444535)

[ghstack-poisoned]
suo added a commit that referenced this pull request May 11, 2020
Before, reassigning a method in a module (like `forward = _forward`)
didn't work, because we look at the function object's name for our def
name when building AST. Mkae that overrideable to handle cases like
reassignment

ghstack-source-id: e2a06bd
Pull Request resolved: #37994
@facebook-github-bot
Copy link
Contributor

@suo merged this pull request in 167a978.

SplitInfinity pushed a commit to SplitInfinity/pytorch that referenced this pull request May 15, 2020
Summary:
This commit removes a print statement added in pytorch#37994 that appears to
be for debugging and was most likely not intended to be commited.

Test Plan:
Continuous integration.
facebook-github-bot pushed a commit that referenced this pull request May 15, 2020
Summary:
**Summary**
This commit removes a print statement added in #37994 that appears to
be for debugging and was most likely not intended to be commited.

**Test Plan**
Continuous integration.
Pull Request resolved: #38524

Differential Revision: D21587268

Pulled By: SplitInfinity

fbshipit-source-id: 6bdcdce647c45f5c0a2ba179a3545a1c0cae1492
@facebook-github-bot facebook-github-bot deleted the gh/suo/331/head branch May 16, 2020 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged oncall: jit Add this issue/PR to JIT oncall triage queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants