Skip to content

Conversation

@mrshenli
Copy link
Contributor

@mrshenli mrshenli commented Jun 2, 2019

Retry #21197

The previous one failed because it uses some Python3 only syntax.

@ezyang Do we still have multi-GPU py2 tests? I am curious why the CI tests did not catch this error.

The previous one failed because it uses some Python3 only syntax
@mrshenli mrshenli requested review from ezyang and kostmo June 2, 2019 20:43
@pytorchbot pytorchbot added the module: nn Related to torch.nn label Jun 2, 2019
Copy link
Contributor

@facebook-github-bot facebook-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.

@mrshenli has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@ezyang
Copy link
Contributor

ezyang commented Jun 3, 2019

The error would only have been caught under the pytorch_linux_xenial_cuda9_cudnn7_py2_test configuration, which is not part of the default set. This is the first instance I'm aware of where the reduction of default tests we ran resulted in a failure not being caught.

To be clear, this was not a "syntax" error per se: it was incorrect spelling of super() keyword. For this particular case, a lint rule might be sufficient to catch occurrences of this in the future.

@mrshenli
Copy link
Contributor Author

mrshenli commented Jun 3, 2019

it was incorrect spelling of super() keyword. For this particular case, a lint rule might be sufficient to catch occurrences of this in the future.

@ezyang I would like to make sure I understand the cause of the previous error. I was using super().__init__() in #21197. I thought I run into the error because that is only allowed in py3. To make it work for both py2 and py3, I need to use super(TestModule, self).__init__().

@ezyang
Copy link
Contributor

ezyang commented Jun 3, 2019

You're correct. All I am clarifying is that there is no syntax error in your Python 3-only code (in the sense that, a SyntaxError would have been raised). Syntax errors are much easier to catch because parsing of the file will fail, even if the code is not exercised.

@facebook-github-bot
Copy link
Contributor

@mrshenli merged this pull request in f62a006.

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

Labels

Merged module: nn Related to torch.nn

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants