Conversation
closes #3957 removes non primary bots from aggregations, scoring, and ranks
📝 WalkthroughWalkthroughChanges introduce differential handling for primary versus non-primary bots across scoring and aggregation logic. Non-primary bots are now unconditionally excluded from rankings and aggregations, while primary bots are preserved when applicable. Affects evaluation question scoring, ranking assignments, and forecast aggregations. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🚀 Preview EnvironmentYour preview environment is ready!
Details
ℹ️ Preview Environment InfoIsolation:
Limitations:
Cleanup:
|
…disqualify-non-primary-bots
…disqualify-non-primary-bots
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In `@scoring/score_math.py`:
- Around line 365-369: The inline comment on the if not only_include_user_ids
branch is incorrect: the code excludes non-primary bots
(base_forecasts.exclude(author__is_bot=True, author__is_primary_bot=False)) when
user IDs are NOT specified, so update the comment to accurately describe that
behavior (e.g., "exclude forecasts by non-primary bots when user ids are not
explicitly specified") so it matches the conditional around
only_include_user_ids and the base_forecasts exclusion.
In `@utils/the_math/aggregations.py`:
- Around line 752-756: The comment is misleading: change the comment above the
forecasts.filter(...) call to state that non-primary bot forecasts are excluded
unless user IDs are explicitly specified (i.e., "exclude non-primary bot
forecasts unless user IDs are explicitly specified"); keep the filter logic
using forecasts.filter(Q(author__is_bot=False) | Q(author__is_primary_bot=True))
intact and ensure the corrected comment sits directly above that line so it
accurately documents the behavior.
- Around line 994-998: The comment above the filter is misleading: the code on
forecasts.filter(Q(author__is_bot=False) | Q(author__is_primary_bot=True))
actually includes non-bot authors OR primary bots (i.e., it excludes non-primary
bots), so update the comment to reflect that behavior (or if the intended
behavior was different, change the filter to match the original intent). Refer
to the forecasts variable and the filter call in this function (same pattern as
in get_aggregations_at_time) and either reword the comment to state "include
only non-bot authors or primary bots when user ids are not specified" or adjust
the Q(...) expressions to implement the original "include forecasts by
non-primary bots only when user ids explicitly specified" semantics.
closes #3957
removes non primary bots from aggregations, scoring, and ranks
Summary by CodeRabbit
Improvements
Tests