Skip to content

Conversation

@suo
Copy link
Member

@suo suo commented Jun 16, 2019

Stack from ghstack:

We try to grab the code attribute, which doesn't work for classes.
Add a better error message in this case

Differential Revision: D15857569

We try to grab the __code__ attribute, which doesn't work for classes.
Add a better error message in this case
@pytorchbot pytorchbot added the oncall: jit Add this issue/PR to JIT oncall triage queue label Jun 16, 2019
@suo suo requested review from driazati and zdevito June 16, 2019 22:16
[jit] improve recursive scripting error message

We try to grab the __code__ attribute, which doesn't work for classes.
Add a better error message in this case

gh-metadata: pytorch pytorch 21841 gh/suo/62/head
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.

Seems fine, but the error message doesn't say what the fn is if not a function and we got there. Also why is it valid to ask for __name__ of a random object?

suo added 2 commits June 17, 2019 10:41
[jit] improve recursive scripting error message

We try to grab the __code__ attribute, which doesn't work for classes.
Add a better error message in this case

gh-metadata: pytorch pytorch 21841 gh/suo/62/head
[jit] improve recursive scripting error message

We try to grab the __code__ attribute, which doesn't work for classes.
Add a better error message in this case

gh-metadata: pytorch pytorch 21841 gh/suo/62/head
@zou3519 zou3519 deleted the gh/suo/62/head branch June 17, 2019 22:26
@facebook-github-bot
Copy link
Contributor

@suo merged this pull request in cdae8b9.

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.

6 participants