Skip to content

Conversation

@rgommers
Copy link
Collaborator

@rgommers rgommers commented May 7, 2020

is_tensor doesn't really have a reason to exist anymore (other than
backwards compatibility) and is worse for typechecking with mypy (see
gh-32824). Given that it may not be obvious what the fix is once mypy
gives an error, make the change in a number of places at once, and add
a note on this to the is_tensor docstring.

Recommending an isinstance check instead has been done for quite a
while, e.g. #7769 (comment)

`is_tensor` doesn't really have a reason to exist anymore (other than
backwards compatibility) and is worse for typechecking with mypy (see
pytorchgh-32824). Given that it may not be obvious what the fix is once mypy
gives an error, make the change in a number of places at once, and add
a note on this to the `is_tensor` docstring.

Recommending an isinstance check instead has been done for quite a
while, e.g. pytorch#7769 (comment)
@rgommers rgommers added the module: typing Related to mypy type annotations label May 7, 2020
@rgommers rgommers requested a review from ezyang May 7, 2020 22:10
@dr-ci
Copy link

dr-ci bot commented May 7, 2020

💊 CI failures summary and remediations

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


  • 3/3 failures introduced in this PR

🕵️ 3 new failures recognized by patterns

The following CI failures do not appear to be due to upstream breakages:

See CircleCI build pytorch_bazel_build (1/3)

Step: "Bazel Build" (full log | diagnosis details | 🔁 rerun)

May 07 22:16:19 caused by: Connection refused (os error 111)
May 07 22:16:19 +++ eval 'extract_trap_cmd ' 
May 07 22:16:19 ++++ extract_trap_cmd 
May 07 22:16:19 ++++ printf '%s\n' '' 
May 07 22:16:19 +++ printf '%s\n' cleanup 
May 07 22:16:19 ++ trap -- ' 
May 07 22:16:19 cleanup' EXIT 
May 07 22:16:19 ++ which sccache 
May 07 22:16:19 ++ sccache --stop-server 
May 07 22:16:19 Stopping sccache server... 
May 07 22:16:19 error: couldn't connect to server 
May 07 22:16:19 caused by: Connection refused (os error 111) 
May 07 22:16:19 ++ true 
May 07 22:16:19 ++ rm /var/lib/jenkins/sccache_error.log 
May 07 22:16:19 rm: cannot remove '/var/lib/jenkins/sccache_error.log': No such file or directory 
May 07 22:16:19 ++ true 
May 07 22:16:19 ++ SCCACHE_ERROR_LOG=/var/lib/jenkins/sccache_error.log 
May 07 22:16:19 ++ SCCACHE_IDLE_TIMEOUT=1200 
May 07 22:16:19 ++ RUST_LOG=sccache::server=error 
May 07 22:16:19 ++ sccache --start-server 
May 07 22:16:19 Starting sccache server... 
May 07 22:16:19 ++ sccache --zero-stats 

See CircleCI build pytorch_windows_vs2019_py36_cuda10.1_build (2/3)

Step: "Build" (full log | diagnosis details | 🔁 rerun)

CMake Error at cmake/public/cuda.cmake:42 (message):
  cmake/Modules_CUDA_fix/FindCUDA.cmake:11 (include)
  cmake/public/cuda.cmake:29 (find_package)
  cmake/Dependencies.cmake:1037 (include)
  CMakeLists.txt:460 (include)


-- Found CUDA: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1 (found version ".") 
-- Caffe2: CUDA detected: .
-- Caffe2: CUDA nvcc is: C:/Users/circleci/project/build/win_tmp/bin/randomtemp.exe
-- Caffe2: CUDA toolkit directory: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1
CMake Error at cmake/public/cuda.cmake:42 (message):
  PyTorch requires CUDA 9.0 and above.
Call Stack (most recent call first):
  cmake/Dependencies.cmake:1037 (include)
  CMakeLists.txt:460 (include)


-- Configuring incomplete, errors occurred!
See also "C:/Users/circleci/project/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/circleci/project/build/CMakeFiles/CMakeError.log".
-- Building version 1.6.0a0+b6a1afc 

See CircleCI build pytorch_windows_vs2019_py36_cpu_test2 (3/3)

Step: "Test" (full log | diagnosis details | 🔁 rerun)

RuntimeError: test_utils failed!
Generated XML report: test-reports\python-unittest\TEST-TestDataLoader-20200507225805.xml 
Generated XML report: test-reports\python-unittest\TEST-TestFFI-20200507225805.xml 
Generated XML report: test-reports\python-unittest\TEST-TestHipify-20200507225805.xml 
Generated XML report: test-reports\python-unittest\TEST-TestHub-20200507225805.xml 
Generated XML report: test-reports\python-unittest\TEST-TestONNXUtils-20200507225805.xml 
Traceback (most recent call last): 
  File "run_test.py", line 690, in <module> 
    main() 
  File "run_test.py", line 683, in main 
    raise RuntimeError(message) 
RuntimeError: test_utils failed! 
 
(base) circleci@PACKER-5E9D8C4B C:\Users\circleci\project\test>if ERRORLEVEL 1 exit /b 1  
+ cleanup
+ retcode=1
+ set +x

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 2 times.

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.

@ezyang is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@ezyang merged this pull request in 726aa71.

@rgommers rgommers deleted the replace-istensor branch May 8, 2020 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged module: typing Related to mypy type annotations open source

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants