File size: 1,896 Bytes
6c2e259 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | ---
license: mit
---
# Example Model for BatterySwapAI 2026
This repository shows how to create a solution for the
[BatterySwapAI 2026 challenge](https://www.nora.ai/competitions/batteryswapai/batteryswapai2026.html).
It contains working example code that can be submitted as-is,
along with tools to check the solution before submitting.
# Setup
## Prerequisites
You need to have the following installed
- git
- Python 3.10+
- Docker
## Setting up virtual environment
On Linux / Mac OS / Windows Subsystem for Linux (WSL)
```
python -m venv venv
source venv/bin/activate
```
Install dependencies
```
pip install -r requirements.txt -r requirements.dev.txt
```
# Developing
## Develop in virtual environment
Run the training
```
python batteryswap_example/train.py
```
# Making submissions
## Submitting trained models
Trained models or other output used by submission processing (`script.py`),
must be committed in the git repository.
An example is `batteryswap_example/planners/best.pickle`.
## Test submissions in Docker - recommended
Using Docker allows to have exactly the same software versions as the submissions system.
This helps to ensure there are no errors when running in the submission environment.
NOTE: this requires around 20 GB+ of disk space.
Build Docker image
```
docker build -t batteryswapai-2026-example .
```
Make submissions and run evaluation
```
docker run --name batteryswapai -v ./dataset:/tmp/data batteryswapai-2026-example bash -c "/app/env/bin/python3 script.py && /app/env/bin/python3 -m batteryswap_public.metric"
```
Copy submission.csv out of container
```
docker cp batteryswapai:/app/submission.csv ./submission.csv
```
## Create new submission
NOTE: remember to commit and push your changes to the HuggingFace model repository.
Use `New submission` in the competition application to submit your current code for evaluation.
|