facebookresearch / facebookresearch/detectron2

Linter changes in clang-format 10

Open
#1,222 6 comments 0 reactions 0 assignees View on GitHub
contributions welcome enhancement
Dominant language
Python
Stars
34.7k
Forks
7.9k
PR merge metrics
No merged PRs in 30d

Description

Linter corrects `detectron2/layers/csrc/deformable/deform_conv_cuda.cu` everytime.
This file should be either excluded, or formatted in master.

## Instructions To Reproduce the Issue:

```
# Checkout master
python3 -m pip install black=19.3b0 isort
./dev/linter.sh
```

## Expected behavior:

No code change.

## Environment:

```
------------------------ -------------------------------------------------------------------
sys.platform linux
Python 3.6.9 (default, Nov 7 2019, 10:44:02) [GCC 8.3.0]
numpy 1.18.2
detectron2 0.1.1 @/mnt/Projects/PyTorchDetector/detectron2/detectron2
detectron2 compiler GCC 7.5
detectron2 CUDA compiler 10.2
detectron2 arch flags sm_70
DETECTRON2_ENV_MODULE
PyTorch 1.6.0a0+3fa53fa @/usr/local/lib/python3.6/dist-packages/torch
PyTorch debug build False
CUDA available True
GPU 0,1,2,3,4,5,6,7 Tesla V100-SXM2-32GB
CUDA_HOME /usr/local/cuda
NVCC Cuda compilation tools, release 10.2, V10.2.89
Pillow 7.1.1
torchvision 0.6.0a0+abc1506 @/usr/local/lib/python3.6/dist-packages/torchvision
torchvision arch flags sm_60, sm_61, sm_70
cv2 4.2.0
------------------------ -------------------------------------------------------------------
PyTorch built with:
- GCC 8.4
- C++ Version: 201402
- Intel(R) Math Kernel Library Version 2020.0.0 Product Build 20191122 for Intel(R) 64 architecture applications
- Intel(R) MKL-DNN v1.2.0 (Git Hash 70f8b879ea7a0c38caedb3320b7c85e8497ff50d)
- OpenMP 201511 (a.k.a. OpenMP 4.5)
- NNPACK is enabled
- CPU capability usage: AVX2
- CUDA Runtime 10.2
- NVCC architecture flags: -gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_52,code=sm_52;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_70,code=compute_70;-gencode;arch=compute_75,code=compute_75
- CuDNN 7.6.5
- Build settings: BLAS=MKL, BUILD_TYPE=Release, CXX_FLAGS= -fvisibility-inlines-hidden -fopenmp -DNDEBUG -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DUSE_INTERNAL_THREADPOOL_IMPL -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, USE_CUDA=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON, USE_STATIC_DISPATCH=OFF,
```

```
# python3 -m pip show flake8 isort black
Name: flake8
Version: 3.7.9
Summary: the modular source code checker: pep8, pyflakes and co
Home-page: https://gitlab.com/pycqa/flake8
Author: Tarek Ziade
Author-email: tarek@ziade.org
License: MIT
Location: /usr/local/lib/python3.6/dist-packages
Requires: entrypoints, pyflakes, mccabe, pycodestyle
Required-by: azureml-train-core
---
Name: isort
Version: 4.3.21
Summary: A Python utility / library to sort Python imports.
Home-page: https://github.com/timothycrosley/isort
Author: Timothy Crosley
Author-email: timothy.crosley@gmail.com
License: MIT
Location: /usr/local/lib/python3.6/dist-packages
Requires:
Required-by:
---
Name: black
Version: 19.3b0
Summary: The uncompromising code formatter.
Home-page: https://github.com/ambv/black
--- Logging error ---
Traceback (most recent call last):
File "/usr/lib/python3.6/logging/__init__.py", line 996, in emit
stream.write(msg)
UnicodeEncodeError: 'ascii' codec can't encode character '\u0141' in position 8: ordinal not in range(128)
Call stack:
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.6/dist-packages/pip/__main__.py", line 19, in
sys.exit(_main())
File "/usr/local/lib/python3.6/dist-packages/pip/_internal/cli/main.py", line 75, in main
return command.main(cmd_args)
File "/usr/local/lib/python3.6/dist-packages/pip/_internal/cli/base_command.py", line 105, in main
return self._main(args)
File "/usr/local/lib/python3.6/dist-packages/pip/_internal/cli/base_command.py", line 186, in _main
status = self.run(options, args)
File "/usr/local/lib/python3.6/dist-packages/pip/_internal/commands/show.py", line 50, in run
results, list_files=options.files, verbose=options.verbose):
File "/usr/local/lib/python3.6/dist-packages/pip/_internal/commands/show.py", line 157, in print_results
write_output("Author: %s", dist.get('author', ''))
File "/usr/local/lib/python3.6/dist-packages/pip/_internal/utils/misc.py", line 522, in write_output
logger.info(msg, *args)
Message: 'Author: %s'
Arguments: ('\u0141ukasz Langa',)
Author-email: lukasz@langa.pl
License: MIT
Location: /usr/local/lib/python3.6/dist-packages
Requires: click, attrs, appdirs, toml
Required-by:
```

Contributor guide

Open the contributing guide

Research direction

Start with dev/linter.sh and inspect how it processes detectron2/layers/csrc/deformable/deform_conv_cuda.cu. Reproduce the issue with the listed linter versions, then determine whether the file should be excluded or formatted in master. Done means rerunning ./dev/linter.sh produces no code changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python, shell
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.