Skip to content

Commit d418d09

Browse files
authored
CI: precommit (#316)
1 parent 6f19d5d commit d418d09

File tree

133 files changed

+167
-182
lines changed

Some content is hidden

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

133 files changed

+167
-182
lines changed

.codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
comment:
22
layout: "flags, files"
33
behavior: default
4-
require_changes: false
4+
require_changes: false
55
require_base: no
66
require_head: no
77
show_carryforward_flags: true

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion

.github/ISSUE_TEMPLATE/bugs.md

Lines changed: 1 addition & 1 deletion

.github/ISSUE_TEMPLATE/new_method.md

Lines changed: 0 additions & 1 deletion

.github/workflows/autoblack.yml

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

.github/workflows/dali_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
key: ${{ runner.os }}-${{ matrix.python }}-pip-${{ hashFiles('**/setup.py') }}
3131
restore-keys: |
3232
${{ runner.os }}-${{ matrix.python }}-pip-
33-
33+
3434
- name: Install Python dependencies
3535
run: |
3636
python -m pip install --upgrade pip

.github/workflows/lint.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: linting
2+
on: [push, pull_request]
3+
4+
jobs:
5+
pre-commit:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v1
9+
- name: Set up Python 3.7
10+
uses: actions/setup-python@v1
11+
with:
12+
python-version: 3.7
13+
14+
- name: set PY
15+
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
16+
- uses: actions/cache@v3
17+
with:
18+
path: ~/.cache/pre-commit
19+
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
20+
21+
- uses: pre-commit/[email protected]

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
key: ${{ runner.os }}-${{ matrix.python }}-pip-${{ hashFiles('**/setup.py') }}
3131
restore-keys: |
3232
${{ runner.os }}-${{ matrix.python }}-pip-
33-
33+
3434
- name: Install Python dependencies
3535
run: |
3636
python -m pip install --upgrade pip

.pre-commit-config.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.4.0
4+
hooks:
5+
- id: end-of-file-fixer
6+
- id: trailing-whitespace
7+
- id: check-case-conflict
8+
- id: check-yaml
9+
- id: check-toml
10+
- id: check-json
11+
- id: check-added-large-files
12+
- id: check-docstring-first
13+
- id: detect-private-key
14+
215
- repo: https://github.com/kynan/nbstripout
316
rev: 0.6.0
417
hooks:

.readthedocs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ python:
1313
path: .
1414

1515
# By default readthedocs does not checkout git submodules
16-
submodules:
17-
include: all
16+
submodules:
17+
include: all

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PA
1515
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
1616
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
1717
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
18-
DEALINGS IN THE SOFTWARE.
18+
DEALINGS IN THE SOFTWARE.

docs/source/solo/args.rst

Lines changed: 0 additions & 3 deletions

docs/source/solo/data.rst

Lines changed: 1 addition & 1 deletion

docs/source/solo/losses/mae.rst

Lines changed: 1 addition & 1 deletion

docs/source/solo/losses/mocov2plus.rst

Lines changed: 1 addition & 1 deletion

docs/source/solo/losses/mocov3.rst

Lines changed: 1 addition & 1 deletion

docs/source/solo/losses/nnclr.rst

Lines changed: 1 addition & 1 deletion

docs/source/solo/losses/ressl.rst

Lines changed: 1 addition & 1 deletion

docs/source/solo/losses/simclr.rst

Lines changed: 1 addition & 1 deletion

docs/source/solo/losses/vibcreg.rst

Lines changed: 1 addition & 1 deletion

docs/source/solo/losses/vicreg.rst

Lines changed: 1 addition & 1 deletion

docs/source/solo/methods/deepclusterv2.rst

Lines changed: 1 addition & 1 deletion

docs/source/start/available.rst

Lines changed: 1 addition & 1 deletion

docs/source/start/install.rst

Lines changed: 1 addition & 1 deletion

docs/source/tutorials/offline_linear_eval.rst

Lines changed: 4 additions & 4 deletions

docs/source/tutorials/umap.rst

Lines changed: 1 addition & 1 deletion

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ wandb
99
scipy
1010
timm
1111
scikit-learn
12-
hydra-core
12+
hydra-core

scripts/finetune/imagenet-100/mae.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ devices: [0, 1, 2, 3, 4, 5, 6, 7]
4848
sync_batchnorm: True
4949
accelerator: "gpu"
5050
strategy: "ddp"
51-
precision: 16
51+
precision: 16
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
enabled: True
22
entity: unitn-mhug
3-
project: "solo-learn"
3+
project: "solo-learn"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
enabled: True
22
entity: None
3-
project: "solo-learn"
3+
project: "solo-learn"

scripts/linear/imagenet-100/barlow.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ devices: [0]
4242
sync_batchnorm: True
4343
accelerator: "gpu"
4444
strategy: "ddp"
45-
precision: 16
45+
precision: 16

scripts/linear/imagenet-100/byol.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ devices: [0]
4242
sync_batchnorm: True
4343
accelerator: "gpu"
4444
strategy: "ddp"
45-
precision: 16
45+
precision: 16

scripts/linear/imagenet-100/deepclusterv2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ devices: [0]
4242
sync_batchnorm: True
4343
accelerator: "gpu"
4444
strategy: "ddp"
45-
precision: 16
45+
precision: 16

scripts/linear/imagenet-100/dino.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ devices: [0]
4242
sync_batchnorm: True
4343
accelerator: "gpu"
4444
strategy: "ddp"
45-
precision: 16
45+
precision: 16

scripts/linear/imagenet-100/mocov2plus.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ devices: [0]
4242
sync_batchnorm: True
4343
accelerator: "gpu"
4444
strategy: "ddp"
45-
precision: 16
45+
precision: 16

scripts/linear/imagenet-100/mocov3.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ devices: [0]
4242
sync_batchnorm: True
4343
accelerator: "gpu"
4444
strategy: "ddp"
45-
precision: 16
45+
precision: 16

scripts/linear/imagenet-100/mocov3_vit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ devices: [0]
4242
sync_batchnorm: True
4343
accelerator: "gpu"
4444
strategy: "ddp"
45-
precision: 16
45+
precision: 16

scripts/linear/imagenet-100/nnclr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ devices: [0]
4242
sync_batchnorm: True
4343
accelerator: "gpu"
4444
strategy: "ddp"
45-
precision: 16
45+
precision: 16

scripts/linear/imagenet-100/ressl.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ devices: [0]
4242
sync_batchnorm: True
4343
accelerator: "gpu"
4444
strategy: "ddp"
45-
precision: 16
45+
precision: 16

scripts/linear/imagenet-100/simclr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ devices: [0]
4242
sync_batchnorm: True
4343
accelerator: "gpu"
4444
strategy: "ddp"
45-
precision: 16
45+
precision: 16

scripts/linear/imagenet-100/simsiam.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ devices: [0]
4242
sync_batchnorm: True
4343
accelerator: "gpu"
4444
strategy: "ddp"
45-
precision: 16
45+
precision: 16

scripts/linear/imagenet-100/swav.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ devices: [0]
4242
sync_batchnorm: True
4343
accelerator: "gpu"
4444
strategy: "ddp"
45-
precision: 16
45+
precision: 16

scripts/linear/imagenet-100/vibcreg.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ devices: [0]
4242
sync_batchnorm: True
4343
accelerator: "gpu"
4444
strategy: "ddp"
45-
precision: 16
45+
precision: 16

0 commit comments

Comments
 (0)