Skip to content

Commit b5bf8fc

Browse files
authored
Merge branch 'main' into transforms/mixupcutmix
2 parents 9abb18b + 719e120 commit b5bf8fc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+508
-86
lines changed

.circleci/config.yml

Lines changed: 3 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.circleci/config.yml.in

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,6 @@ commands:
4545
our_upload_channel=test
4646
fi
4747
echo "export UPLOAD_CHANNEL=${our_upload_channel}" >> ${BASH_ENV}
48-
install_cuda_compatible_cmath:
49-
description: "Install CUDA compatible cmath"
50-
steps:
51-
- run:
52-
name: _HACK_ Install CUDA compatible cmath
53-
no_output_timeout: 1m
54-
command: |
55-
powershell .circleci/scripts/vs_install_cmath.ps1
5648

5749
brew_update:
5850
description: "Update Homebrew and install base formulae"
@@ -192,8 +184,9 @@ jobs:
192184
- checkout
193185
- run:
194186
command: |
195-
pip install --user --progress-bar off flake8 typing
196-
flake8 --config=setup.cfg .
187+
pip install --user --progress-bar off pre-commit
188+
pre-commit install-hooks
189+
- run: pre-commit run --all-files
197190

198191
python_type_check:
199192
docker:
@@ -300,7 +293,6 @@ jobs:
300293
steps:
301294
- checkout_merge
302295
- designate_upload_channel
303-
- install_cuda_compatible_cmath
304296
- run:
305297
name: Build conda packages
306298
no_output_timeout: 20m
@@ -332,7 +324,6 @@ jobs:
332324
steps:
333325
- checkout_merge
334326
- designate_upload_channel
335-
- install_cuda_compatible_cmath
336327
- run:
337328
name: Build wheel packages
338329
command: |
@@ -712,7 +703,6 @@ jobs:
712703
steps:
713704
- checkout
714705
- designate_upload_channel
715-
- install_cuda_compatible_cmath
716706
- run:
717707
name: Generate cache key
718708
# This will refresh cache on Sundays, nightly build should generate new cache.
@@ -754,7 +744,6 @@ jobs:
754744
steps:
755745
- checkout
756746
- designate_upload_channel
757-
- install_cuda_compatible_cmath
758747
- run:
759748
name: Generate cache key
760749
# This will refresh cache on Sundays, nightly build should generate new cache.
@@ -884,7 +873,6 @@ jobs:
884873
steps:
885874
- checkout_merge
886875
- designate_upload_channel
887-
- install_cuda_compatible_cmath
888876
- run:
889877
command: |
890878
set -ex
@@ -898,7 +886,6 @@ jobs:
898886
steps:
899887
- checkout_merge
900888
- designate_upload_channel
901-
- install_cuda_compatible_cmath
902889
- run:
903890
command: |
904891
set -ex

.circleci/scripts/vs_install_cmath.ps1

Lines changed: 0 additions & 5 deletions
This file was deleted.

.circleci/unittest/linux/scripts/run-clang-format.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2222
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2323
SOFTWARE.
24-
"""
25-
"""A wrapper script around clang-format, suitable for linting multiple files
24+
25+
A wrapper script around clang-format, suitable for linting multiple files
2626
and to use for continuous integration.
2727
2828
This is an alternative API for the clang-format command line.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
start /wait "" "%miniconda_exe%" /S /InstallationType=JustMe /RegisterPython=0 /AddToPath=0 /D=%tmp_conda%
1+
start /wait "" "%miniconda_exe%" /S /InstallationType=JustMe /RegisterPython=0 /AddToPath=0 /D=%tmp_conda%

.pre-commit-config.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
repos:
2+
- repo: https://gitlab.com/pycqa/flake8
3+
rev: 3.9.2
4+
hooks:
5+
- id: flake8
6+
args: [--config=setup.cfg]
7+
- repo: https://github.com/pre-commit/pre-commit-hooks
8+
rev: v4.0.1
9+
hooks:
10+
- id: check-docstring-first
11+
- id: check-toml
12+
- id: check-yaml
13+
exclude: packaging/.*
14+
- id: end-of-file-fixer

CONTRIBUTING.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ If you plan to modify the code or documentation, please follow the steps below:
6464
2. If you have modified the code (new feature or bug-fix), please add unit tests.
6565
3. If you have changed APIs, update the documentation. Make sure the documentation builds.
6666
4. Ensure the test suite passes.
67-
5. Make sure your code passes `flake8` formatting check.
67+
5. Make sure your code passes the formatting checks (see below).
6868

6969
For more details about pull requests,
7070
please read [GitHub's guides](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request).
@@ -75,9 +75,19 @@ If you would like to contribute a new dataset, please see [here](#New-dataset).
7575

7676
### Code formatting and typing
7777

78-
New code should be compatible with Python 3.X versions and be compliant with PEP8. To check the codebase, please run
78+
Contributions should be compatible with Python 3.X versions and be compliant with PEP8. To check the codebase, please
79+
either run
7980
```bash
80-
flake8 --config=setup.cfg .
81+
pre-commit run --all-files
82+
```
83+
or run
84+
```bash
85+
pre-commit install
86+
```
87+
once to perform these checks automatically before every `git commit`. If `pre-commit` is not available you can install
88+
it with
89+
```
90+
pip install pre-commit
8191
```
8292

8393
The codebase has type annotations, please make sure to add type hints if required. We use `mypy` tool for type checking:

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ otherwise, add the include and library paths in the environment variables ``TORC
106106
.. _libjpeg: http://ijg.org/
107107
.. _libjpeg-turbo: https://libjpeg-turbo.org/
108108

109-
C++ API
110-
=======
111-
TorchVision also offers a C++ API that contains C++ equivalent of python models.
109+
Using the models on C++
110+
=======================
111+
TorchVision provides an example project for how to use the models on C++ using JIT Script.
112112

113113
Installation From source:
114114

android/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,3 @@ allprojects {
3939
ext.deps = [
4040
jsr305: 'com.google.code.findbugs:jsr305:3.0.1',
4141
]
42-

android/test_app/app/src/main/res/layout/activity_main.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
android:background="@android:color/black"
1515
android:textColor="@android:color/white" />
1616

17-
</FrameLayout>
17+
</FrameLayout>

0 commit comments

Comments
 (0)