Skip to content
Open
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
13 changes: 2 additions & 11 deletions neurons/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,8 @@ def store_or_use_cached_evaluation(self, miner_evaluations: Dict[int, MinerEvalu
Handle evaluation cache: store successful evals, fallback to cache for GitHub failures.

Mutates the passed dict, replacing failed evaluations with cached ones if available.
A mirror-only fetch failure also routes through the cache-fallback path so the miner
is evaluated against a coherent one-round-stale snapshot instead of a fresh-legacy +
zeroed-mirror view where cross-PR multipliers would recompute over a partial state.
A mirror/identity fetch failure routes through the cache-fallback path so the miner
is evaluated against a coherent one-round-stale snapshot when no PRs could be loaded.

Returns:
Set of UIDs that were restored from cache (should be skipped during DB storage
Expand All @@ -164,14 +163,6 @@ def store_or_use_cached_evaluation(self, miner_evaluations: Dict[int, MinerEvalu
self.evaluation_cache.store(miner_eval)
continue

# Legacy partial-pagination failure with no mirror outage: the current eval
# holds a truncated legacy PR list that would be misleading to cache or swap out.
if not miner_eval.should_use_cache_fallback and not miner_eval.mirror_pr_fetch_failed:
bt.logging.warning(
f'UID {uid}: GitHub fetch failed after partial PR load; skipping cache store/fallback this round'
)
continue

cached_eval = self.evaluation_cache.get(uid, miner_eval.hotkey, miner_eval.github_id)
if cached_eval is not None:
bt.logging.info(
Expand Down