Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
6356904
Update version.json
ObadaS Sep 1, 2026
e75fd14
Merge pull request #2527 from codalab/Version-Bump
ObadaS Sep 1, 2026
4475bc8
add option to forbid the compute worker from pulling the competition …
Aug 3, 2026
78bcb0f
rename feature name
Sep 1, 2026
7c0899a
Merge pull request #2486 from codalab/never_pull_compeititon_image
wlln Sep 8, 2026
21ac827
packages bump via uv lock --upgrade; bump django 5.2.15 -> 5.2.16 (pa…
Aug 24, 2026
4e3c2af
rebase and update some packages via uv lock --upgrade
Aug 28, 2026
1ebe647
various packages upgrades with uv lock --upgrade
Sep 1, 2026
9b084c3
Merge pull request #2513 from codalab/packages_upgrades
Didayolo Sep 8, 2026
7b5d573
Add pagination to GET /api/competitions and fix participating_in leak
ihsaan-ullah Aug 7, 2026
ad07165
Merge pull request #2493 from codalab/competiitons_api
ObadaS Sep 8, 2026
f5d36b2
remove ram limit for site_worker
Aug 27, 2026
68b6a1c
update limit to 15 GB, same as default quota
Sep 8, 2026
781e9a4
Update docker-compose.yml
Didayolo Sep 8, 2026
84b4351
Merge pull request #2519 from codalab/docker_compose_site_worker_ram_…
Didayolo Sep 8, 2026
fc2e51b
queue creation error improved
ihsaan-ullah Aug 4, 2026
07c3a34
allow users to add collaborators to queues when the queue adding limi…
ihsaan-ullah Aug 8, 2026
c5f4ea2
Merge pull request #2489 from codalab/queue_creation
Didayolo Sep 8, 2026
0819aa5
Remove robot submissions and bot user feature
ihsaan-ullah Aug 10, 2026
bba3a75
Merge pull request #2499 from codalab/remove_robot
Didayolo Sep 9, 2026
26664e7
Fix migrations
Didayolo Sep 10, 2026
fdbd056
Merge pull request #2533 from codalab/fix_migrations
Didayolo Sep 10, 2026
e5ab806
privacy link updated
ihsaan-ullah Aug 22, 2026
aae5208
Merge pull request #2509 from codalab/privacy_link
Didayolo Sep 10, 2026
f0a6f99
Fix organization name not showing on leaderboard for multi-task compe…
ihsaan-ullah Aug 10, 2026
8c7c09e
Merge pull request #2498 from codalab/submit_as_organization
Didayolo Sep 10, 2026
17416df
Merge pull request #2487 from codalab/throttling
ihsaan-ullah Sep 10, 2026
f4ad7a4
restrict get_details to submission owner or admin
ihsaan-ullah Aug 29, 2026
31638df
Merge pull request #2525 from codalab/submission_detail_api
Didayolo Sep 10, 2026
09000e4
Switch to quay.io for mc and minio images (#2537)
ObadaS Sep 14, 2026
1c4b27a
Deny anonymous access to /api/submissions/ list and retrieve (#2536)
ihsaan-ullah Sep 14, 2026
bc930d6
Packages upgrade (#2535)
ObadaS Sep 15, 2026
ca2d885
Submission API: Enforce phase start/end window on submission creation…
ihsaan-ullah Sep 15, 2026
537a2a7
compute worker workaround for api throttling
Sep 17, 2026
22b9e08
Add External Competitions feature (#2508)
ihsaan-ullah Sep 17, 2026
c083c72
Merge pull request #2549 from codalab/throttling_workaround
Didayolo Sep 17, 2026
88f0e0d
Option to stop compute worker from sending logs and/or prediction fil…
ObadaS Sep 17, 2026
0fd8fd6
Revert "Compute worker workaround for API throttling"
Didayolo Sep 18, 2026
1f67c05
Merge pull request #2552 from codalab/revert-2549-throttling_workaround
Didayolo Sep 18, 2026
0cff052
Revert "Merge pull request #2487 from codalab/throttling"
Didayolo Sep 18, 2026
7e58fc6
Merge pull request #2553 from codalab/revert-2487-throttling
Didayolo Sep 18, 2026
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
7 changes: 7 additions & 0 deletions .env_sample
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ ENABLE_SIGN_UP=True
ENABLE_SIGN_IN=True


# -----------------------------------------------------------------------------
# Enable or disable the External Competitions feature (button, page, API,
# and the daily fetch task). Off by default - intended for the main instance only.
# -----------------------------------------------------------------------------
EXTERNAL_COMPETITIONS_ENABLED=False


# # S3 storage example
# STORAGE_TYPE=s3
# AWS_ACCESS_KEY_ID=12312312312312312331223
Expand Down
318 changes: 206 additions & 112 deletions compute_worker/compute_worker.py

Large diffs are not rendered by default.

99 changes: 60 additions & 39 deletions compute_worker/uv.lock

Large diffs are not rendered by default.

10 changes: 4 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ services:
# Minio local storage helper
#----------------------------------------------------------------------------------------------------
minio:
image: minio/minio:RELEASE.2025-04-22T22-12-26Z
image: quay.io/minio/minio:RELEASE.2025-04-22T22-12-26Z
command: server /export
volumes:
- ./var/minio:/export
Expand All @@ -69,7 +69,7 @@ services:
interval: 5s
retries: 5
createbuckets:
image: minio/mc:RELEASE.2025-07-21T05-28-08Z
image: quay.io/minio/mc:RELEASE.2025-07-21T05-28-08Z
depends_on:
minio:
condition: service_healthy
Expand Down Expand Up @@ -219,9 +219,7 @@ services:
deploy:
resources:
limits:
# Limit memory substantially here so we see any problems that may
# appear on Heroku ahead of time
memory: 256M
memory: 15GB

compute_worker:
command: ["celery -A compute_worker worker -l info -Q compute-worker -n compute-worker@%n"]
Expand All @@ -244,7 +242,7 @@ services:
environment:
- BROKER_URL=pyamqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@${RABBITMQ_HOST}:${RABBITMQ_PORT}//
# Make the worker leave behind the submission so we can examine it
- CODALAB_IGNORE_CLEANUP_STEP=1
- COMPUTE_WORKER_NO_CLEANUP=True
tty: true
logging:
options:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
External Competitions lets a Codabench instance show a browsable list of public competitions hosted on *other* Codabench and CodaLab instances, fetched and synced automatically once a day. It's off by default and intended for the main `codabench.org` instance rather than self-hosted deployments.

## For Codabench administrators

### Enabling the feature

Set the following in your `.env` file:

```
EXTERNAL_COMPETITIONS_ENABLED=True
```

This turns on the External Competitions page, a banner/link to it on the public benchmarks and competitions page, the two read-only API endpoints, and the daily Celery beat task that fetches and syncs competitions. Leaving it `False` (the default) disables all of it - the API endpoints return a 404, and the page and the banner linking to it aren't shown.

### Adding a platform to sync from

Platforms are managed from the Django admin, under **External Competitions -> External platforms -> Add**. Each platform needs:

| Field | Description |
|---|---|
| Name | Display name shown on the competition tiles (e.g. "Codabench @ LISN") |
| Platform type | `Codabench instance` or `CodaLab instance` |
| Competitions fetch URL | The API endpoint to get that platform's list of public competitions |
| Competition base URL | The base URL used to create complete link for each competition |
| Active | Unchecking this skips the platform in the daily fetch (already-synced competitions stay visible - see note below) |

Once saved, the platform is picked up by the next scheduled fetch (or trigger one manually, see below).

### How the sync works

`fetch_external_competitions` (`src/apps/external_competitions/tasks.py`) runs once a day via Celery beat. For each active platform it calls the fetcher matching its platform type (`codabench_fetcher.py` or `codalab_fetcher.py`) and then diffs the result against what's already stored:

- Competitions present in the fetch are created or updated (matched by `competition_url`).
- Competitions no longer present in the fetch are deleted.

Each run writes an `ExternalFetchLog` entry (visible in the admin) recording the outcome (`SUCCESS`/`FAILURE`), counts (`new_count`/`updated_count`/`deleted_count`), and, on failure, an error message - check there first if a platform's competitions look stale or missing.

!!! note
Deactivating a platform (`is_active=False`) only stops it from being fetched going forward - competitions already synced from it stay visible on the public list until manually removed.

To trigger a fetch immediately instead of waiting for the daily schedule:

```bash
docker compose exec django ./manage.py shell -c "from external_competitions.tasks import fetch_external_competitions; fetch_external_competitions()"
```

## For platform administrators

If you run your own Codabench or CodaLab instance and would like your public competitions to be discoverable on `codabench.org`'s External Competitions page, you can request to be added.

### Registering your platform

Send an email to **info@codabench.org** with the subject **"Platform Registration for External Competitions"**, including:

- **Your platform's name and type** (Codabench, CodaLab instance, or other).
- **Your competitions fetch URL** - the API endpoint we'll use once a day to retrieve your list of public competitions (for example, a Codabench instance's `.../api/competitions/public/`). This endpoint must be publicly reachable without authentication, since the fetch runs unattended.
- **Your competition base URL** - the base URL used to build the link back to each competition on your site, so visitors clicking a competition on `codabench.org` land on the right page on yours.

Please share as much detail as you can, **especially about the fetch URL** - pagination behavior, response format, expected size of the response, rate limits, or anything else likely to affect an automated daily fetch. The more we know upfront, the more reliably we can keep your competitions in sync.

### Unregistering your platform

To have your platform's competitions removed or paused, email **info@codabench.org** asking us to deactivate (or delete) fetching for your platform, including your platform's name and/or URL so we can identify it.
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ You can update these by:
1. Replacing the logos in `src/static/img/` folder
2. Updating the code in `src/templates/pages/home.html` to point to the right websites of your organizations

!!! tip
Now that your instance is up and running, consider registering it with `codabench.org` as an [External Competitions](External-Competitions.md) platform. Once registered, your instance's public competitions are also listed on `codabench.org`'s own External Competitions page, giving them more visibility. See the [registration instructions](External-Competitions.md#registering-your-platform) for details.

## Frequently asked questions (FAQs)

Expand Down Expand Up @@ -374,7 +376,7 @@ MINIO_PORT=9000
# Minio local storage helper
#-----------------------------------------------
minio:
image: minio/minio:RELEASE.2020-10-03T02-19-42Z
image: quay.io/minio/minio:RELEASE.2025-04-22T22-12-26Z
command: server /export --certs-dir /root/.minio/certs
volumes:
- ./var/minio:/export
Expand All @@ -388,7 +390,7 @@ MINIO_PORT=9000
interval: 5s
retries: 5
createbuckets:
image: minio/mc
image: quay.io/minio/mc:RELEASE.2025-07-21T05-28-08Z
depends_on:
minio:
condition: service_healthy
Expand Down
Loading
Loading