Skip to content

Commit 40cec16

Browse files
committed
Fix logging percentage
1 parent 792ad45 commit 40cec16

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

functions-python/reverse_geolocation/src/scripts/reverse_geolocation_process_verifier.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
},
8181
]
8282
run_with_feed_index = (
83-
6 # Set to an integer index to run with a specific feed from the list above
83+
1 # Set to an integer index to run with a specific feed from the list above
8484
)
8585

8686

@@ -236,7 +236,7 @@ def create_test_data(feed_stable_id: str, feed_dict: Dict, db_session: Session =
236236
from gcp_storage_emulator.server import create_server
237237
from flask import Flask, Request
238238

239-
strategy = ReverseGeocodingStrategy.PER_POLYGON
239+
strategy = ReverseGeocodingStrategy.PER_POINT
240240

241241
feed_dict = feeds[run_with_feed_index]
242242
feed_stable_id = feed_dict["stable_id"]

functions-python/reverse_geolocation/src/strategy_extraction_per_point.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ def extract_location_aggregates_per_point(
3232
logger.warning("No stops to process")
3333
return
3434
batch_size = max(
35-
int(total_stop_count / 20), total_stop_count
36-
) # Process 5% of the total stops in each batch
35+
1, int(total_stop_count * 0.05)
36+
) # Process ~5% of the total stops in each batch
3737
for _, stop in stops_df.iterrows():
3838
if i % batch_size == 0:
3939
remaining_stops_count = total_stop_count - i

functions-python/reverse_geolocation/src/strategy_extraction_per_polygon.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def extract_location_aggregates_per_polygon(
7474
total_stop_count = len(remaining_stops_df)
7575
last_seen_count = total_stop_count
7676
batch_size = max(
77-
int(total_stop_count / 20), 0
77+
1, int(total_stop_count * 0.05)
7878
) # Process ~5% of the total stops in each batch
7979
stop_clustered_total = 0
8080
while not remaining_stops_df.empty:

0 commit comments

Comments
 (0)