Skip to content

Conversation

@rohan-varma
Copy link
Contributor

@rohan-varma rohan-varma commented Oct 1, 2019

These imports need to go after the check to not break windows since rpc is not supported on windows. I ran the linter and that moved it to before the check in #26570. This wasn't caught by the windows tests in the PR since it was failing due to a JIT-related reason: (https://ci.pytorch.org/jenkins/job/pytorch-builds/job/pytorch-win-ws2016-cuda9-cudnn7-py3-test2/49433/console). In the future, we should probably have a warning/a comment/some message about discouraging running linters? Thanks to @peterjc123 for flagging this.

@rohan-varma rohan-varma requested a review from peterjc123 October 1, 2019 05:12
@rohan-varma rohan-varma changed the title Move imports to after test in test_rpc to fix windows builds Move imports to after is_available in test_rpc to fix windows builds Oct 1, 2019
@peterjc123
Copy link
Collaborator

@pytorchbot merge this please

@pytorchbot pytorchbot added the merge-this-please Was marked for merge with @pytorchbot merge this please label Oct 1, 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.

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

@rohan-varma
Copy link
Contributor Author

@peterjc123, I created #27129 to discuss how we can improve/prevent this from happening. Feel free to chime in with your thoughts.


import sys
import unittest
from os import getenv
Copy link
Contributor

Choose a reason for hiding this comment

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

Why does getenv need to move?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It doesn't, but I just wanted to replicate how it looked before. We may want to talk about refactoring this to avoid in the future, which I've opened a discussion about in #27129.

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.

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

@facebook-github-bot
Copy link
Contributor

@rohan-varma merged this pull request in 85abfc1.

@xush6528
Copy link
Contributor

xush6528 commented Oct 1, 2019

I think we should disable test_rpc for windows tests, since RPC component is built on Linux socket/network API.

@mrshenli @zhaojuanmao

@pietern
Copy link
Contributor

pietern commented Oct 1, 2019

@xush6528 They are disabled on Windows -- but the file is still sourced, which caused this issue.

@xush6528
Copy link
Contributor

xush6528 commented Oct 1, 2019

@pietern Yes, I mean disable sourcing it.

never mind. I saw it has been disabled by #25656.

pdlive215 pushed a commit to pdlive215/pytorch that referenced this pull request Nov 27, 2019
…ytorch#27126)

Summary:
These imports need to go after the check to not break windows since rpc is not supported on windows. I ran the linter and that moved it to before the check in pytorch#26570. This wasn't caught by the windows tests in the PR since it was failing due to a JIT-related reason: (https://ci.pytorch.org/jenkins/job/pytorch-builds/job/pytorch-win-ws2016-cuda9-cudnn7-py3-test2/49433/console). In the future, we should probably have a warning/a comment/some message about discouraging running linters? Thanks to peterjc123 for flagging this.
Pull Request resolved: pytorch#27126

Differential Revision: D17682761

Pulled By: rohan-varma

fbshipit-source-id: 300c74290d734eb8e5880104d2b76dd64217b696
thiagocrepaldi pushed a commit to thiagocrepaldi/pytorch that referenced this pull request Feb 4, 2020
…ytorch#27126)

Summary:
These imports need to go after the check to not break windows since rpc is not supported on windows. I ran the linter and that moved it to before the check in pytorch#26570. This wasn't caught by the windows tests in the PR since it was failing due to a JIT-related reason: (https://ci.pytorch.org/jenkins/job/pytorch-builds/job/pytorch-win-ws2016-cuda9-cudnn7-py3-test2/49433/console). In the future, we should probably have a warning/a comment/some message about discouraging running linters? Thanks to peterjc123 for flagging this.
Pull Request resolved: pytorch#27126

Differential Revision: D17682761

Pulled By: rohan-varma

fbshipit-source-id: 300c74290d734eb8e5880104d2b76dd64217b696
@facebook-github-bot facebook-github-bot deleted the fix_rpc_invoke branch July 13, 2020 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-this-please Was marked for merge with @pytorchbot merge this please Merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants