Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
SkafteNicki committed Jul 31, 2024
1 parent 1c77780 commit cff4f4a
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/check_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ jobs:
cache-dependency-path: setup.py

- name: Install dependencies
run: pip install -r requirements.txt
run: |
pip install -r requirements.txt
pip list
- name: Build docs
run: mkdocs build -d build --strict
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/code_formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip list
- name: ruff check
run: |
ruff check .
- name: ruff format
run: |
ruff format .
4 changes: 3 additions & 1 deletion .github/workflows/deploy_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ jobs:
cache-dependency-path: setup.py

- name: Install dependencies
run: pip install -r requirements.txt
run: |
pip install -r requirements.txt
pip list
- name: Deploy docs
run: mkdocs gh-deploy --force
1 change: 1 addition & 0 deletions .github/workflows/repo_scraper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -r tools/repo_scraper/requirements.txt
pip list
- name: Run repo scraper
env:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repos:
- id: detect-private-key

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.7
rev: v0.5.5
hooks:
# try to fix what is possible
- id: ruff
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ mkdocs-git-revision-date-localized-plugin>=1.2.6
mkdocs-exclude>=1.0.2

# Developer stuff
ruff>=0.4.7
ruff>=0.5.5
codespell>=2.2.6
pre-commit>=3.7.0

Expand Down
2 changes: 1 addition & 1 deletion s10_extra/exercise_files/fashion_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def output_label(label):
8: "Bag",
9: "Ankle Boot",
}
label = label.item() if type(label) == torch.Tensor else label
label = label.item() if isinstance(label, torch.Tensor) else label
return output_mapping[label]


Expand Down
4 changes: 2 additions & 2 deletions s6_the_cloud/using_the_cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -667,15 +667,15 @@ the images we are used to that use Pytorch.
'build',
'.',
'-t',
'europe-west1-docker.pkg.dev/$PROJECT_ID/<registry-name>/_IMAGE_NAME',
'europe-west1-docker.pkg.dev/$PROJECT_ID/<registry-name>/$_IMAGE_NAME',
'-f',
'<path-to-dockerfile>'
]
- name: 'gcr.io/cloud-builders/docker'
id: 'Push container image'
args: [
'push',
'europe-west1-docker.pkg.dev/$PROJECT_ID/<registry-name>/_IMAGE_NAME'
'europe-west1-docker.pkg.dev/$PROJECT_ID/<registry-name>/$_IMAGE_NAME'
]
substitutions:
_IMAGE_NAME: 'my_image'
Expand Down
2 changes: 1 addition & 1 deletion s9_scalable_applications/exercise_files/fashion_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def output_label(label):
8: "Bag",
9: "Ankle Boot",
}
label = label.item() if type(label) == torch.Tensor else label
label = label.item() if isinstance(torch.Tensor) else label
return output_mapping[label]


Expand Down

0 comments on commit cff4f4a

Please sign in to comment.