Skip to content

Commit 98c99c9

Browse files
authored
Release 4.1.6 (#275)
* consider all verified media for base reward * bump version
1 parent 91f0f64 commit 98c99c9

File tree

5 files changed

+18
-13
lines changed

5 files changed

+18
-13
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.1.5
1+
4.1.6

gas/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "4.1.5"
1+
__version__ = "4.1.6"
22

33
version_split = __version__.split(".")
44
__spec_version__ = (

gas/cache/content_manager.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -620,13 +620,15 @@ def get_unrewarded_verified_miner_media(self, limit: int = 100) -> List[MediaEnt
620620
"""Get verified miner media entries that haven't been rewarded yet."""
621621
return self.content_db.get_unrewarded_verified_miner_media(limit=limit)
622622

623-
def get_unrewarded_verification_stats(self, limit: int = None) -> Dict[str, Dict[str, Any]]:
623+
def get_unrewarded_verification_stats(self, limit: int = None, include_all: bool = False) -> Dict[str, Dict[str, Any]]:
624624
"""
625-
Get verification statistics for unrewarded miner media (pass rates, etc.).
625+
Get verification statistics for miner media (pass rates, etc.).
626626
Returns raw statistics without computing rewards - that's done in rewards.py.
627627
628628
Args:
629-
limit: Maximum number of unrewarded entries to consider per miner
629+
limit: Maximum number of entries to consider per miner
630+
include_all: If False (default), only return stats for unrewarded media.
631+
If True, return stats for ALL verified media (rewarded + unrewarded)
630632
631633
Returns:
632634
Dict mapping miner hotkey to verification stats:
@@ -644,9 +646,15 @@ def get_unrewarded_verification_stats(self, limit: int = None) -> Dict[str, Dict
644646
}
645647
"""
646648
try:
647-
verified_media = self.get_unrewarded_verified_miner_media(limit=limit or 1000)
649+
if include_all:
650+
verified_media = self.get_miner_media(verification_status="verified")
651+
if limit and len(verified_media) > limit:
652+
verified_media = verified_media[:limit]
653+
else:
654+
verified_media = self.get_unrewarded_verified_miner_media(limit=limit or 1000)
648655
if not verified_media:
649-
bt.logging.debug("No unrewarded verified miner media found")
656+
media_type = "verified miner media" if include_all else "unrewarded verified miner media"
657+
bt.logging.debug(f"No {media_type} found")
650658
return {}
651659

652660
miner_stats = {}

install.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,6 @@ if [ "$SKIP_SYSTEM_DEPS" = false ]; then
112112
fi
113113

114114

115-
rm -rf ~/.cache/sn34
116-
117115
# Check if we're in the right directory
118116
if [ ! -f "pyproject.toml" ]; then
119117
log_error "pyproject.toml not found. Please run this script from the project root directory."
@@ -421,4 +419,4 @@ if [ "$SYS_DEPS_ONLY" = false ]; then
421419
fi
422420
echo
423421
echo -e "${BLUE}═══════════════════════════════════════════════════${NC}"
424-
fi
422+
fi

neurons/validator/validator.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ async def run(self):
143143
"\N{GRINNING FACE WITH SMILING EYES}",
144144
f"Initialization Complete. Validator starting at block: {self.subtensor.block}",
145145
)
146-
146+
#await self.set_weights(0)
147147
while not self.exit_context.isExiting:
148148
self.step += 1
149149
if self.config.autoupdate and (self.step == 0 or not self.step % 300):
@@ -239,9 +239,8 @@ async def update_scores(self):
239239
Update self.scores with exponential moving average of rewards.
240240
"""
241241
# Get verification stats for only unrewarded media to quickly slash for submissions that fail verification
242-
verification_stats = self.content_manager.get_unrewarded_verification_stats()
242+
verification_stats = self.content_manager.get_unrewarded_verification_stats(include_all=True)
243243
generator_base_rewards, media_ids = get_generator_base_rewards(verification_stats)
244-
245244
generator_results, discriminator_results = await get_benchmark_results(
246245
self.wallet.hotkey, self.metagraph, base_url=self.config.benchmark.api_url
247246
)

0 commit comments

Comments
 (0)