feat: GEE image fetch reporting for export_batch#84
Merged
Conversation
Adds a FetchStats class that tracks planned, completed, failed, and cached GEE fetch operations across export chunks. Stats are logged to stderr after each chunk completes when show_progress=True, giving users visibility into quota usage, cache reuse, and whether runtime is dominated by GEE fetching. Closes cybergis#76
- FetchStats now tracks the most recently completed point index and sensor collection, shown as last=point:N,sensor:X in the log line - CHANGELOG.md updated (required by CI)
Collaborator
|
Goood job! Thank you @amrit110 🍻 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #76
FetchStats, a thread-safe class intools/progress.pythat accumulates GEE fetch statistics: total planned fetches, completed, failed, and cache hitsFetchStatsintoPrefetchManager.fetch_chunk()— updated on every task success, failure, and cache skipBatchExportercreates aFetchStatsinstance whenshow_progress=Trueand a GEE provider is active; logs a summary line to stderr after each chunk completes (per-item layout) or after all prefetching finishes (combined layout)show_progress=Falseor when no GEE provider is involved (e.g. precomputed models)Example output with
chunk_size=2and 6 points:Test plan
tests/test_fetch_stats.py— 28 new tests covering:FetchStatsunit tests (counters, format, thread safety with 200-thread race)PrefetchManagerintegration (planned counts, cache hits, partial cache hits, failure recording)export_batchend-to-end (log emitted when enabled, suppressed when disabled, correct counts, multi-chunk cumulative accumulation, no log for precomputed models)