Skip to content

Resolve logger warnings #1981

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions pytorch3d/implicitron/dataset/sql_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -755,15 +755,15 @@ def _load_filter_eval_batches(self):
if pick_sequences:
old_len = len(eval_batches)
eval_batches = [b for b in eval_batches if b[0][0] in pick_sequences]
logger.warn(
logger.warning(
f"Picked eval batches by sequence/cat: {old_len} -> {len(eval_batches)}"
)

if self.exclude_sequences:
old_len = len(eval_batches)
exclude_sequences = set(self.exclude_sequences)
eval_batches = [b for b in eval_batches if b[0][0] not in exclude_sequences]
logger.warn(
logger.warning(
f"Excluded eval batches by sequence: {old_len} -> {len(eval_batches)}"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,11 @@ def _show_predictions(
assert isinstance(preds, list)

pred_all = []
# Randomly choose a subset of the rendered images, sort by ordr in the sequence
# Randomly choose a subset of the rendered images, sort by order in the sequence
n_samples = min(n_samples, len(preds))
pred_idx = sorted(random.sample(list(range(len(preds))), n_samples))
for predi in pred_idx:
# Make the concatentation for the same camera vertically
# Make the concatenation for the same camera vertically
pred_all.append(
torch.cat(
[
Expand Down Expand Up @@ -359,7 +359,7 @@ def _generate_prediction_videos(
vws = {}
for k in predicted_keys:
if k not in preds[0]:
logger.warn(f"Cannot generate video for prediction key '{k}'")
logger.warning(f"Cannot generate video for prediction key '{k}'")
continue
cache_dir = (
None
Expand Down