Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
c844ba3
Wayback Slider Working Version
nnt-git13 Oct 6, 2025
5cbe40a
Fixed Calendar and Unit Test Added
nnt-git13 Oct 14, 2025
af483bc
Merge branch 'master' into new_webUROP_2
KartikP Oct 14, 2025
30f465e
Fixed Unit test
nnt-git13 Oct 20, 2025
23fa0e3
Merge branch 'new_webUROP_2' of https://github.com/brain-score/brain-…
nnt-git13 Oct 20, 2025
9fe5e01
Merge branch 'master' into new_webUROP_2
KartikP Oct 20, 2025
c265f0b
Headless_True
nnt-git13 Oct 20, 2025
214d2a4
Remove Sleep Time
nnt-git13 Oct 20, 2025
8564da2
Small change for date box
nnt-git13 Nov 4, 2025
0d0534a
Merge branch 'master' into new_webUROP_2
KartikP Nov 12, 2025
60f5895
Wayback Filter Added to Export
nnt-git13 Nov 20, 2025
0fe88d1
Merge branch 'new_webUROP_2' of https://github.com/brain-score/brain-…
nnt-git13 Nov 20, 2025
dc1bc21
Merge branch 'master' into new_webUROP_2
KartikP Nov 20, 2025
cb23dc2
Addressed code-review changes
nnt-git13 Dec 8, 2025
4538d62
Merge branch 'new_webUROP_2' of https://github.com/brain-score/brain-…
nnt-git13 Dec 8, 2025
5a6cfab
Try testing without ranks
nnt-git13 Dec 9, 2025
dc4146c
clean up
KartikP Dec 15, 2025
55f8070
reset slider handle after reset button press
KartikP Dec 15, 2025
761389f
Move wayback timestamp slider to first column and adjust input box width
KartikP Dec 15, 2025
0509932
Merge branch 'master' into new_webUROP_2
KartikP Dec 15, 2025
64a47cf
Disable start_timestamp. Make it conditional so we can re-enable if n…
KartikP Dec 15, 2025
52fe74b
Fix input box overflow in col container
KartikP Dec 15, 2025
92a7bd0
re-introduce whitespace
KartikP Dec 15, 2025
95c3c64
fix blank lines
KartikP Dec 15, 2025
71f2776
Update tests after web_test update
KartikP Dec 15, 2025
09b3ed1
Merge timestamp fields from kp/add-timestamp-to-scores into mv.sql
KartikP Dec 15, 2025
e7fde84
upper bound calendar input with checks
KartikP Dec 17, 2025
25378ed
parseURLFilters() and setRangerValues() correctly
KartikP Dec 17, 2025
64a47cc
Update benchmark counts
KartikP Dec 17, 2025
6fdadd6
use color-utils from #485 to rescale colors after wayback
KartikP Dec 17, 2025
5cd6128
move depth calculation outside of model row loop
KartikP Dec 17, 2025
1d379bc
fix color and aggregation calculation
KartikP Dec 17, 2025
ca450a9
Optimization improvement:
KartikP Dec 17, 2025
2baba6d
fix export to exclude hidden benchmark and sort by fscore
KartikP Dec 17, 2025
0602e43
Only exclude benchmarks hidden by wayback filtering, not where where …
KartikP Dec 18, 2025
fab43a9
Merge remote-tracking branch 'origin/master' into new_webUROP_2
KartikP Dec 18, 2025
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
4 changes: 2 additions & 2 deletions benchmarks/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,8 @@ class Score(models.Model):
score_raw = models.FloatField(default=0, null=True)
score_ceiled = models.FloatField(default=0, null=True)
error = models.FloatField(default=0, null=True)
start_timestamp = models.DateTimeField(blank=True)
end_timestamp = models.DateTimeField(auto_now_add=True, blank=True, null=True)
start_timestamp = models.DateTimeField(null=True, blank=True)
end_timestamp = models.DateTimeField(null=True, blank=True)
comment = models.CharField(max_length=1000, null=True)

def __repr__(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
<span class="text-wrapper">Advanced Filters</span>
</button>
{% endif %}

<button id="exportCsvButton" class="btn-secondary" style="background-color: #47B7DE; color: white; border: none; white-space: nowrap" title="Export leaderboard data and plugin metadata">
<i class="fa-solid fa-download"></i> Export
</button>

{% if domain == "vision" %}
<button id="tutorialBtn" style="margin-left: 8px;" title="Interactive walkthrough of the leaderboard">
<i class="fa-solid fa-info"></i>
Expand Down Expand Up @@ -210,6 +210,27 @@ <h4>Benchmark Properties</h4>
</div>
</div>
</div>
<!-- Wayback Timestamp Section -->
<div class="metadata-section" id="waybackTimestampSection" style="display: none;">
<div class="filter-group" id="waybackTimestampFilter">
<div class="filter-header">
<label>Wayback Timestamp</label>
<div class="range-values">
<input type="date" class="range-input-min" id="waybackDateMin">
<span class="range-separator">to</span>
<input type="date" class="range-input-max" id="waybackDateMax">
</div>
</div>
<div class="range-filter dual-handle">
<div class="slider-container" data-min="0" data-max="2000000000">
<div class="slider-track"></div>
<div class="slider-range"></div>
<div class="slider-handle handle-min" data-value="0"></div>
<div class="slider-handle handle-max" data-value="2000000000"></div>
</div>
</div>
</div>
</div>
</div>
</div>

Expand Down
19 changes: 18 additions & 1 deletion benchmarks/views/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

from benchmarks.models import Score, FinalBenchmarkContext, FinalModelContext, Reference
from ..utils import cache_get_context
from datetime import datetime

_logger = logging.getLogger(__name__)

Expand All @@ -33,7 +34,23 @@
color_suffix = '_color'
color_None = '#e0e1e2'


def get_datetime_range(models):
"""Extract min and max timestamps from model scores."""
timestamps = []
for model in models:
for score in (model.scores or []):
ts = score.get("end_timestamp")
if ts:
try:
timestamps.append(datetime.fromisoformat(ts))
except Exception:
pass # Ignore malformed timestamps
if timestamps:
return {
"min": min(timestamps).isoformat(),
"max": max(timestamps).isoformat(),
}
return None

def get_base_model_query(domain="vision"):
"""Get the base model query for a domain before any filtering"""
Expand Down
19 changes: 18 additions & 1 deletion benchmarks/views/leaderboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
from django.views.decorators.cache import cache_page
from django.db.models import Model
logger = logging.getLogger(__name__)
from .index import get_context, get_datetime_range # Add get_datetime_range import
from datetime import datetime
import pytz

def json_serializable(obj):
"""Recursively convert NumPy and other types to Python native types"""
Expand Down Expand Up @@ -320,7 +323,8 @@ def get_ag_grid_context(user=None, domain="vision", benchmark_filter=None, model
'color': score.get('color'),
'complete': score.get('is_complete', True),
# Include minimal benchmark info only when needed for citations
'benchmark': minimal_benchmark if minimal_benchmark else None
'benchmark': score.get('benchmark', {}),
'timestamp': score.get('end_timestamp')
}
row_data.append(rd)

Expand Down Expand Up @@ -439,6 +443,19 @@ def get_priority(field):
}
}

# Compute datetime range for wayback timestamp filter
datetime_range = get_datetime_range(context['models'])
if datetime_range:
# Parse the timestamps to get Unix timestamps for the slider
min_timestamp = datetime.fromisoformat(datetime_range['min'])
max_timestamp = datetime.fromisoformat(datetime_range['max'])
filter_options['datetime_range'] = {
'min': datetime_range['min'],
'max': datetime_range['max'],
'min_unix': int(min_timestamp.timestamp()),
'max_unix': int(max_timestamp.timestamp())
}

# 4) Attach JSON-serialized data to template context
stimuli_map = {}
data_map = {}
Expand Down
Loading