feat(cli): show repo allocation in miner score#1284
Conversation
b4b6d30 to
a9033c8
Compare
Result simulationSetup: dev miner (UID 1), eligible. Repos: Non-maintainer miner
Reconcile: Maintainer miner (
Reconcile: The "Maintainer reward" column auto-appears only when at least one row has a positive maintainer reward; non-maintainer miners see the cleaner 7-column layout. |
a9033c8 to
62fca66
Compare
|
|
||
|
|
||
| def _round6(x: float) -> float: | ||
| return round(x, 6) |
There was a problem hiding this comment.
No need for one-liner extracted helper
|
Updated PR. Plz re-review @anderdc Thanks. |
…-allocation-breakdown # Conflicts: # gittensor/validator/emission_allocation.py
anderdc
left a comment
There was a problem hiding this comment.
Move RepoEmissionAllocation out of gittensor/validator/emission_allocation.py into gittensor/classes.py (alongside RepoEvaluation / MinerEvaluation / CachedEvaluation). It's the return type of a public allocator consumed by both the validator and the CLI gitt miner score path, so it belongs with the other cross-module data types, not inline in the allocation logic module. After the move, drop the dataclass, field imports from emission_allocation.py and import RepoEmissionAllocation from gittensor.classes.
anderdc
left a comment
There was a problem hiding this comment.
gittensor/cli/miner_commands/score.py:337 imports _build_maintainer_uids_by_repo from gittensor.validator.forward. The leading underscore marks it private but the CLI is now a legitimate cross-module caller — drop the underscore at the definition site (gittensor/validator/forward.py:134) and update the CLI import. Same layering principle as the RepoEmissionAllocation move.
Summary
Add a per-repository emission allocation breakdown to
gitt miner score.The JSON output now includes an
allocation_breakdownarray showing each relevant repository’s emission slice, PR/issue split, miner scores, and allocated rewards. The normal table output also includes a compact repo allocation table.This makes the final blended reward easier to understand after repo-bounded emission allocation.
Related Issues
Closes #1283
Type of Change
Testing
Results:
34 passedChecklist