Skip to content

Commit

Permalink
Add warning message when skipping
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjstewart committed Feb 29, 2024
1 parent 2b121f8 commit 4740a4c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion experiments/ssl4eo/download_ssl4eo.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
import json
import os
import time
import warnings
from collections import defaultdict
from datetime import date, timedelta
from multiprocessing.dummy import Lock, Pool
Expand Down Expand Up @@ -473,10 +474,13 @@ def update(self, delta: int = 1) -> int:
counter = Counter()

def worker(idx: int) -> None:
# Skip if idx has already been downloaded
if idx in ext_coords.keys():
return
# Skip when not in pre-sampled coords like sampled_locations.csv

# Skip if idx is not in pre-sampled coordinates
if idx not in match_coords.keys():
warnings.warn(f"{idx} not found in {args.match_file}, skipping.")
return

worker_start = time.time()
Expand Down

0 comments on commit 4740a4c

Please sign in to comment.