|
7 | 7 |
|
8 | 8 | import bittensor as bt |
9 | 9 |
|
10 | | -from gittensor.classes import Issue, MinerEvaluation, PRState, PullRequest |
| 10 | +from gittensor.classes import Issue, MinerEvaluation, PullRequest |
11 | 11 | from gittensor.constants import ( |
12 | 12 | SECONDS_PER_DAY, |
13 | 13 | SECONDS_PER_HOUR, |
|
27 | 27 | MERGE_SUCCESS_RATIO_ATTEMPTS_THRESHOLD, |
28 | 28 | MERGE_SUCCESS_RATIO_APPLICATION_DATE, |
29 | 29 | POTENTIAL_SCORE_COLLATERAL_PERCENT, |
30 | | - COLLATERAL_EFFECTIVE_DATE, # Used in apply_cross_miner_multipliers_and_finalize for reinflation |
31 | | - COLLATERAL_REINFLATION_MULTIPLIER, |
32 | 30 | ) |
33 | 31 | from gittensor.utils.github_api_tools import get_pull_request_file_changes, normalize_repo_name |
34 | 32 |
|
@@ -127,10 +125,7 @@ def calculate_time_decay_multiplier(pr: PullRequest) -> float: |
127 | 125 |
|
128 | 126 |
|
129 | 127 | def apply_cross_miner_multipliers_and_finalize(miner_evaluations: Dict[int, MinerEvaluation]) -> None: |
130 | | - """Apply uniqueness multipliers and finalize scores for merged PRs. |
131 | | -
|
132 | | - Merged PRs created after COLLATERAL_EFFECTIVE_DATE receive reinflation boost. |
133 | | - """ |
| 128 | + """Apply uniqueness multipliers and finalize scores for merged PRs.""" |
134 | 129 | bt.logging.info("**Finalizing merged PR scores**") |
135 | 130 |
|
136 | 131 | repo_counts = count_repository_contributors(miner_evaluations) |
@@ -160,12 +155,6 @@ def apply_cross_miner_multipliers_and_finalize(miner_evaluations: Dict[int, Mine |
160 | 155 | # Calculate final earned score now that all multipliers are set |
161 | 156 | pr.calculate_final_earned_score() |
162 | 157 |
|
163 | | - # Reinflation boost for PRs created after collateral effective date |
164 | | - if pr.created_at > COLLATERAL_EFFECTIVE_DATE: |
165 | | - original = pr.earned_score |
166 | | - pr.earned_score *= COLLATERAL_REINFLATION_MULTIPLIER |
167 | | - bt.logging.info(f" PR #{pr.number} reinflation: {original:.2f} -> {pr.earned_score:.2f}") |
168 | | - |
169 | 158 | evaluation.base_total_score += pr.base_score |
170 | 159 | evaluation.total_score += pr.earned_score |
171 | 160 | evaluation.total_lines_changed += pr.total_lines_scored |
|
0 commit comments