Metadata-Version: 2.4
Name: ml-std
Version: 2.0.0
Summary: The standard library for Brunost ML and RL tasks: one pinned set of packages that the Judge runs and contestants install.
License-Expression: MIT
Project-URL: Homepage, https://github.com/noki-official/ml-std
Project-URL: Repository, https://github.com/noki-official/ml-std
Project-URL: Issues, https://github.com/noki-official/ml-std/issues
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: torch==2.7.1
Requires-Dist: torchvision==0.22.1
Requires-Dist: torchaudio==2.7.1
Requires-Dist: pytorch-lightning==2.5.2
Requires-Dist: timm==1.0.16
Requires-Dist: einops==0.8.1
Requires-Dist: transformers==4.54.0
Requires-Dist: tokenizers==0.21.2
Requires-Dist: datasets==3.6.0
Requires-Dist: huggingface-hub==0.34.2
Requires-Dist: safetensors==0.5.3
Requires-Dist: accelerate==1.8.1
Requires-Dist: peft==0.16.0
Requires-Dist: sentence-transformers==4.1.0
Requires-Dist: sentencepiece==0.2.1
Requires-Dist: evaluate==0.4.4
Requires-Dist: numpy==2.2.6
Requires-Dist: pandas==2.2.3
Requires-Dist: scipy==1.14.1
Requires-Dist: scikit-learn==1.6.1
Requires-Dist: xgboost==3.0.2
Requires-Dist: lightgbm==4.6.0
Requires-Dist: catboost==1.2.8
Requires-Dist: statsmodels==0.14.4
Requires-Dist: numba==0.61.2
Requires-Dist: pyarrow==20.0.0
Requires-Dist: networkx==3.4.2
Requires-Dist: pillow==11.1.0
Requires-Dist: scikit-image==0.25.0
Requires-Dist: librosa==0.11.0
Requires-Dist: nltk==3.9.1
Requires-Dist: spacy==3.8.7
Requires-Dist: matplotlib==3.10.0
Requires-Dist: seaborn==0.13.2
Requires-Dist: gymnasium==1.2.0
Requires-Dist: pytest==8.4.1
Requires-Dist: tqdm==4.67.1
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: ruff>=0.4; extra == "dev"
Dynamic: license-file

# ml-std

The standard library for Brunost ML and RL tasks.

One pinned set of packages. The Judge's ML sandbox image installs exactly one
release of `ml-std`; a contestant installs the same release and has the
Judge's environment on their own machine:

```bash
pip install ml-std==2.0.0
python -m ml_std check      # "environment matches the Judge runtime"
```

On Linux x86_64 add `--extra-index-url https://download.pytorch.org/whl/cpu`
to get the CPU build of PyTorch (the Judge runs CPU workers; the default
PyPI wheel drags in CUDA libraries). macOS and aarch64 wheels are CPU-only.

Nothing else is importable inside the Judge (no network, no pip), so this
package's dependency list is the complete answer to "what can I use?".

## What is in it

The contest environment of [IOAI 2025](https://github.com/IOAI-official/IOAI-2025)
(Python 3.12.7, `requirements.txt`), reduced to the ML-relevant packages
and pinned at exactly their versions, so training for Brunost is training
for the Olympiad:

| Area | Packages |
| --- | --- |
| Deep learning | torch 2.7.1, torchvision 0.22.1, torchaudio 2.7.1, pytorch-lightning 2.5.2, timm 1.0.16, einops 0.8.1 |
| Hugging Face | transformers 4.54.0, tokenizers 0.21.2, datasets 3.6.0, huggingface-hub 0.34.2, safetensors 0.5.3, accelerate 1.8.1, peft 0.16.0, sentence-transformers 4.1.0, sentencepiece 0.2.1, evaluate 0.4.4 |
| Classic ML and data | numpy 2.2.6, pandas 2.2.3, scipy 1.14.1, scikit-learn 1.6.1, xgboost 3.0.2, lightgbm 4.6.0, catboost 1.2.8, statsmodels 0.14.4, numba 0.61.2, pyarrow 20.0.0, networkx 3.4.2 |
| Images, audio, text | pillow 11.1.0, scikit-image 0.25.0, librosa 0.11.0, nltk 3.9.1, spacy 3.8.7 |
| Plotting | matplotlib 3.10.0, seaborn 0.13.2 |
| RL and testing | gymnasium 1.2.0, pytest 8.4.1, tqdm 4.67.1 |

Deviations from IOAI 2025, both forced by Python 3.13 wheels: scipy 1.14.1
(IOAI 1.13.1) and sentencepiece 0.2.1 (IOAI 0.2.0). Left out on purpose:
GPU-only packages (bitsandbytes, diffusers), notebooks (jupyter, ipykernel)
and API clients, which are not part of a judged solution.

| ml-std | Judge runtime | Python |
| --- | --- | --- |
| 2.0.0 | `python-3.13-ml-v1` | 3.13 |

## Releasing a new runtime

1. Change the pins in `pyproject.toml`, bump `version` there and `__version__`.
2. `python -m ml_std catalog > src/ml_std/runtimes/<version>.json` (keep the old files: earlier runtimes stay known).
3. Set `RUNTIME` to the new runtime name (`python-3.13-ml-v2`, ...).
4. Build and publish the wheel; build the Judge image with `ML_STD_SPEC=ml-std==<version>` and map the new runtime in `BRUNOST_JUDGE_SANDBOX_IMAGES`.

Tasks already published keep their runtime; new tasks default to the newest.
`python -m ml_std runtimes` prints every runtime this release knows about,
which is what the Judge's `GET /v1/runtimes` serves to the task editor.
