Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #9

Merged
merged 2 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
repos:
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
rev: 7.0.0
hooks:
- id: flake8
args: ["--config", ".flake8"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: mixed-line-ending
- repo: https://github.com/psf/black
rev: 23.11.0
rev: 24.4.2
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: 5.13.1
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black"]
8 changes: 5 additions & 3 deletions dataset_loaders/dataset_loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -887,9 +887,11 @@ def __init__(

# Allow up to one level of nesting
self.feats = [
[load_features(df, feats_inner) for feats_inner in feats]
if isinstance(feats, list)
else load_features(df, feats)
(
[load_features(df, feats_inner) for feats_inner in feats]
if isinstance(feats, list)
else load_features(df, feats)
)
for feats in input_features
]

Expand Down
18 changes: 10 additions & 8 deletions evaluation/retrieval_evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,16 @@ def retrieval_evaluation(
frames = frames[:, ::frame_stride]
splits = torch.split(frames, nframes, 1)
splits_pad = [
x
if x.shape[1] == nframes
else torch.index_select(
x,
dim=1,
index=torch.floor(
torch.linspace(0, x.shape[1] - 1, nframes, device=device)
).to(torch.int64),
(
x
if x.shape[1] == nframes
else torch.index_select(
x,
dim=1,
index=torch.floor(
torch.linspace(0, x.shape[1] - 1, nframes, device=device)
).to(torch.int64),
)
)
for x in splits
]
Expand Down
Loading