Skip to content

Conversation

@v0dro
Copy link
Contributor

@v0dro v0dro commented May 29, 2020

Allows ReflectionPad 1D and 2D to accept 0-dim batch sizes.

Related to issues:

@dr-ci
Copy link

dr-ci bot commented May 29, 2020

💊 CI failures summary and remediations

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


  • 7/7 failures introduced in this PR

🕵️ 7 new failures recognized by patterns

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

See CircleCI build pytorch_windows_vs2019_py36_cuda10.1_test1 (1/7)

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

RuntimeError: test_nn failed!
  File "C:\Jenkins\Miniconda3\lib\site-packages\scipy\_distributor_init.py", line 61, in <module> 
    WinDLL(os.path.abspath(filename)) 
  File "C:\Jenkins\Miniconda3\lib\ctypes\__init__.py", line 348, in __init__ 
    self._handle = _dlopen(self._name, mode) 
OSError: [WinError 126] The specified module could not be found 
Traceback (most recent call last): 
  File "run_test.py", line 721, in <module> 
    main() 
  File "run_test.py", line 714, in main 
    raise RuntimeError(message) 
RuntimeError: test_nn failed! 
 
(base) circleci@PACKER-5EE89583 C:\Users\circleci\project\test>if ERRORLEVEL 1 exit /b 1  
+ cleanup
+ retcode=1
+ set +x

See CircleCI build pytorch_linux_xenial_py3_6_gcc5_4_build (2/7)

Step: "(Optional) Merge target branch" (full log | diagnosis details | 🔁 rerun)

Automatic merge failed; fix conflicts and then commit the result.
CONFLICT (add/add): Merge conflict in .circleci/scripts/binary_ios_upload.sh 
Auto-merging .circleci/scripts/binary_ios_upload.sh 
CONFLICT (add/add): Merge conflict in .circleci/docker/common/install_base.sh 
Auto-merging .circleci/docker/common/install_base.sh 
CONFLICT (add/add): Merge conflict in .circleci/docker/build.sh 
Auto-merging .circleci/docker/build.sh 
CONFLICT (add/add): Merge conflict in .circleci/config.yml 
Auto-merging .circleci/config.yml 
CONFLICT (add/add): Merge conflict in .circleci/cimodel/data/simple/docker_definitions.py 
Auto-merging .circleci/cimodel/data/simple/docker_definitions.py 
Automatic merge failed; fix conflicts and then commit the result. 

See CircleCI build pytorch_windows_vs2019_py36_cuda10.1_on_cpu_test1 (3/7)

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

RuntimeError: test_nn failed!
  File "C:\Jenkins\Miniconda3\lib\site-packages\scipy\_distributor_init.py", line 61, in <module> 
    WinDLL(os.path.abspath(filename)) 
  File "C:\Jenkins\Miniconda3\lib\ctypes\__init__.py", line 348, in __init__ 
    self._handle = _dlopen(self._name, mode) 
OSError: [WinError 126] The specified module could not be found 
Traceback (most recent call last): 
  File "run_test.py", line 721, in <module> 
    main() 
  File "run_test.py", line 714, in main 
    raise RuntimeError(message) 
RuntimeError: test_nn failed! 
 
(base) circleci@PACKER-5EE89590 C:\Users\circleci\project\test>if ERRORLEVEL 1 exit /b 1  
+ cleanup
+ retcode=1
+ set +x

See CircleCI build pytorch-linux-xenial-py3-clang5-android-ndk-r19c-gradle-build-x86_32 (4/7)

Step: "pytorch android gradle build only x86_32 (for PR)" (full log | diagnosis details | 🔁 rerun)

Jun 24 06:31:53 ./.circleci/scripts/build_android_gradle.sh: line 73: /opt/gradle/gradle-6.5/bin/gradle: No such file or directory
Jun 24 06:31:53 ANDROID_NDK_HOME=/opt/ndk 
Jun 24 06:31:53 INSTALLED_DB= 
Jun 24 06:31:53 _=/usr/bin/env 
Jun 24 06:31:53 + export GRADLE_LOCAL_PROPERTIES=/var/lib/jenkins/workspace/android/local.properties 
Jun 24 06:31:53 + GRADLE_LOCAL_PROPERTIES=/var/lib/jenkins/workspace/android/local.properties 
Jun 24 06:31:53 + rm -f /var/lib/jenkins/workspace/android/local.properties 
Jun 24 06:31:53 + echo sdk.dir=/opt/android/sdk 
Jun 24 06:31:53 + echo ndk.dir=/opt/ndk 
Jun 24 06:31:53 + echo cmake.dir=/usr/local 
Jun 24 06:31:53 + /opt/gradle/gradle-6.5/bin/gradle -p android assembleRelease --debug --stacktrace -PABI_FILTERS=x86 --offline 
Jun 24 06:31:53 ./.circleci/scripts/build_android_gradle.sh: line 73: /opt/gradle/gradle-6.5/bin/gradle: No such file or directory 

See CircleCI build pytorch_windows_vs2019_py36_cpu_test1 (5/7)

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

RuntimeError: test_nn failed!
  File "C:\Jenkins\Miniconda3\lib\site-packages\scipy\_distributor_init.py", line 61, in <module> 
    WinDLL(os.path.abspath(filename)) 
  File "C:\Jenkins\Miniconda3\lib\ctypes\__init__.py", line 348, in __init__ 
    self._handle = _dlopen(self._name, mode) 
OSError: [WinError 126] The specified module could not be found 
Traceback (most recent call last): 
  File "run_test.py", line 721, in <module> 
    main() 
  File "run_test.py", line 714, in main 
    raise RuntimeError(message) 
RuntimeError: test_nn failed! 
 
(base) circleci@PACKER-5EE89590 C:\Users\circleci\project\test>if ERRORLEVEL 1 exit /b 1  
+ cleanup
+ retcode=1
+ set +x

See CircleCI build pytorch_windows_vs2019_py36_cuda10.1_test2 (6/7)

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

RuntimeError: test_cuda failed!
  File "C:\Jenkins\Miniconda3\lib\site-packages\scipy\_distributor_init.py", line 61, in <module> 
    WinDLL(os.path.abspath(filename)) 
  File "C:\Jenkins\Miniconda3\lib\ctypes\__init__.py", line 348, in __init__ 
    self._handle = _dlopen(self._name, mode) 
OSError: [WinError 126] The specified module could not be found 
Traceback (most recent call last): 
  File "run_test.py", line 721, in <module> 
    main() 
  File "run_test.py", line 714, in main 
    raise RuntimeError(message) 
RuntimeError: test_cuda failed! 
 
(base) circleci@PACKER-5EE89583 C:\Users\circleci\project\test>if ERRORLEVEL 1 exit /b 1  
+ cleanup
+ retcode=1
+ set +x

See CircleCI build pytorch_xla_linux_bionic_py3_6_clang9_build (7/7)

Step: "(Optional) Merge target branch" (full log | diagnosis details | 🔁 rerun)

Automatic merge failed; fix conflicts and then commit the result.
CONFLICT (add/add): Merge conflict in .circleci/scripts/binary_ios_upload.sh 
Auto-merging .circleci/scripts/binary_ios_upload.sh 
CONFLICT (add/add): Merge conflict in .circleci/docker/common/install_base.sh 
Auto-merging .circleci/docker/common/install_base.sh 
CONFLICT (add/add): Merge conflict in .circleci/docker/build.sh 
Auto-merging .circleci/docker/build.sh 
CONFLICT (add/add): Merge conflict in .circleci/config.yml 
Auto-merging .circleci/config.yml 
CONFLICT (add/add): Merge conflict in .circleci/cimodel/data/simple/docker_definitions.py 
Auto-merging .circleci/cimodel/data/simple/docker_definitions.py 
Automatic merge failed; fix conflicts and then commit the result. 

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 or post in the (internal) Dr. CI Users group.

See how this bot performed.

This comment has been revised 21 times.

@gchanan gchanan requested review from albanD and mruberry June 1, 2020 14:58
@gchanan gchanan added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Jun 1, 2020
@mruberry
Copy link
Collaborator

mruberry commented Jun 2, 2020

CUDA test failures are real. Do you know what the issue is?

@v0dro
Copy link
Contributor Author

v0dro commented Jun 5, 2020

@mruberry problems have been resolved. Could you please review?


def test_ReflectionPad_empty(self, device):
for mod, inp in [
(torch.nn.ReflectionPad1d(2), torch.randn(0, 3, 10, device=device)),
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think you're covering all the cases? Don't you need to check ReflectionPad1D with a 2D and 3D input with a zero batch size plus ReflectionPad2D with a 3D and 4D input with a zero batch size?

You should also add test cases that fail, where the non-batch dimension is zero and you assert you hit the appropriate error (self.assertRaisesRegex(...)), and a check for backward when the batch dim is zero.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah yes good point. Will add them thank you.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The checks for 2D/3D input are done in the python code in functional.py and the ReflectionPad1D does not get called unless the input is specifically dim=3. Same goes for 2D reflection pad (with dim=4). Therefore such tests are not needed.

However I have added tests for non-batch dimension being zero. The backward is tested in the _test_module_empty_input.

@mruberry
Copy link
Collaborator

mruberry commented Jun 5, 2020

@mruberry problems have been resolved. Could you please review?

Looks pretty good and clean, but you need to add more test cases to validate all the new behavior.

@v0dro
Copy link
Contributor Author

v0dro commented Jun 20, 2020

@mruberry can you please review this PR again?

@mruberry mruberry self-requested a review June 24, 2020 05:39
Copy link
Collaborator

@mruberry mruberry left a comment

Choose a reason for hiding this comment

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

Thanks for the follow-up, v0dro! I added a decorator to the test that should resolve the XLA build failure. If the tests pass this should be good to go!

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.

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

@facebook-github-bot
Copy link
Contributor

@mruberry merged this pull request in cf8a9b5.

@mruberry
Copy link
Collaborator

This was successfully merged. Thanks v0dro!

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

Labels

Merged open source triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants