Skip to content

Refresh the leaderboard's data without restarting the Space - #31

Merged
jhewers-pf merged 1 commit into
mainfrom
jhewers-pf-leaderboard-refresh
Nov 13, 2026
Merged

jhewers-pf merged 1 commit into
mainfrom
jhewers-pf-leaderboard-refresh

Conversation

@jhewers-pf

@jhewers-pf jhewers-pf commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

The leaderboard restarted its Space every 5 minutes to pick up new results. Each restart took the page down and killed any submission in progress.

  • src/live.py: a background job downloads the results and requests datasets into a new snapshot every COILBENCH_LEADERBOARD_INTERVAL seconds.
  • Handlers read the current snapshot each time they run. Private load events redraw the table and the queue on each page load.
  • The Explore pickers fill on each sub-tab's first visit, so loading a page still downloads no coilsets.
  • Results go to the Hub cache, so a result deleted from the dataset disappears too.
  • A failed refresh keeps the last snapshot. A failed first download leaves the board empty until the next refresh, instead of restarting the Space.

Testing

  • New unit tests cover LiveData and the table reading live frames.
  • Ran the app locally with a 20 s interval and checked it in headless Chromium: table, Pareto plot, coilset plot, Netron frame and queue.
  • The queue counts changed between startup and page load (2/2 to 3/1 running/pending), so pages show refreshed data.

The leaderboard restarted its Space every 5 minutes to pick up new results.
Each restart took the page down and killed any submission in progress.

A background job now downloads the results and requests datasets into a
new snapshot every COILBENCH_LEADERBOARD_INTERVAL seconds (src/live.py).
Handlers read the current snapshot each time they run, and private load
events redraw the table and the queue on each page load. The Explore
pickers fill on each sub-tab's first visit, so loading a page still
downloads no coilsets.

Results go to the Hub cache instead of a local_dir, so a result deleted
from the dataset disappears too. A failed refresh keeps the last snapshot,
and a failed first download leaves the board empty until the next refresh
instead of restarting the Space.
@jhewers-pf
jhewers-pf force-pushed the jhewers-pf-leaderboard-refresh branch from bdeb69a to ff57507 Compare November 13, 2026 12:59
@jhewers-pf
jhewers-pf merged commit 7e0b39d into main Nov 13, 2026
3 checks passed
@jhewers-pf
jhewers-pf deleted the jhewers-pf-leaderboard-refresh branch November 13, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant