oasislmf.warmup¶
Warm the Numba JIT cache for all pytools modules.
Runs each tool’s compilation in a parallel process pool so that all ~191 Numba-compiled functions are cached in __pycache__ before the first real model run. This eliminates the 163-365 s cold-start overhead.
Test assets are bundled in oasislmf/_data/warmup/ (~400 KB) so this works
both from a source checkout and after pip install oasislmf from PyPI.
- Usage (CLI):
oasislmf warmup
- Usage (standalone):
python -m oasislmf.warmup
- Usage (Dockerfile):
RUN pip install oasislmf && oasislmf warmup
- Usage (pytest):
pytest tests/pytools/test_jit_compilation.py::test_jit_compile_all -v
- Disable (when using NUMBA_DISABLE_JIT):
NUMBA_DISABLE_JIT=1 oasislmf warmup