ihsaan-ullah's picture
competition upload script added
a264233
|
Raw
History Blame Contribute Delete
1.03 kB

Codabench Competition Bundle Upload Script

This script uploads a Codabench competition bundle ZIP file through the Codabench REST API.

It performs the following steps automatically:

  1. Authenticate with Codabench
  2. Create a competition bundle dataset
  3. Upload the ZIP file
  4. Finalize the upload
  5. Wait for the competition to be created

Requirements

Install dependencies:

pip install python-dotenv

Create a .env

CODABENCH_BASE_URL=https://www.codabench.org
CODABENCH_TOKEN=your_token_here  # optional is you want to use your username and password to get token

Usage

Using an API token from .env:

python codabench/upload_bundle.py competition_bundle.zip

Using username and password:

python codabench/upload_bundle.py \
  --username USERNAME \
  --password PASSWORD \
  competition_bundle.zip

Using a custom Codabench instance:

python codabench/upload_bundle.py \
  --base-url https://your-codabench-instance.org \
  competition_bundle.zip