Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
[pre-commit.ci] pre-commit suggestions (#1092)
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] authored Jan 4, 2022
1 parent 47b3dd6 commit 6cc2ca1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.1.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
Expand All @@ -35,7 +35,7 @@ repos:
- id: detect-private-key

- repo: https://github.com/asottile/pyupgrade
rev: v2.29.0
rev: v2.31.0
hooks:
- id: pyupgrade
args: [--py36-plus]
Expand All @@ -60,13 +60,13 @@ repos:
args: [--in-place, --wrap-summaries=115, --wrap-descriptions=120]

- repo: https://github.com/psf/black
rev: 21.10b0
rev: 21.12b0
hooks:
- id: black
name: Format code

- repo: https://github.com/asottile/blacken-docs
rev: v1.11.0
rev: v1.12.0
hooks:
- id: blacken-docs
args: [ --line-length=120, --skip-errors ]
Expand Down
1 change: 0 additions & 1 deletion flash/core/serve/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,5 @@ def outputs(self) -> ParameterContainer:
def uid(self) -> str:
return self._flashserve_meta_.uid


else:
ModelComponent = object
5 changes: 0 additions & 5 deletions tests/core/serve/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ def classify(self, img):
out = self.model(img)
return ([out.argmax(), out.argmax()], torch.Tensor([21]))


except TypeError:
ClassificationInferenceRepeated = None

Expand All @@ -115,7 +114,6 @@ def classify(self, img):
assert out.argmax() == out2.argmax()
return out.argmax()


except TypeError:
ClassificationInferenceRepeated = None

Expand All @@ -141,7 +139,6 @@ def classify(self, img):
assert out.argmax() == out2.argmax()
return out.argmax()


except TypeError:
ClassificationInferenceModelMapping = None

Expand Down Expand Up @@ -171,7 +168,6 @@ def classify(self, img, tag):

return out.argmax(), img


except TypeError:
ClassificationInferenceComposable = None

Expand All @@ -198,6 +194,5 @@ def predict(self, section, isle, row, stadium):
stadium_idx = torch.tensor(1000)
return torch.Tensor([seat_num]), stadium_idx


except TypeError:
SeatClassifier = None

0 comments on commit 6cc2ca1

Please sign in to comment.