warmup#
- superglm.warmup() None#
Compile superglm’s model-fitting kernels ahead of the first fit.
Use it where compiling ahead pays: a cluster’s start-up script, an image build or a benchmark, with
NUMBA_CACHE_DIRon persistent storage so the compiled kernels outlive the process. Otherwise do not call it: a first fit compiles only the kernels it needs and saves them to Numba’s cache, and later sessions load them from there.It compiles the kernels of every family and route,
RandomEffectandFactorSmoothterms included, and the two basis kernels a prediction of 8,192 rows or more reads. It compiles in worker processes, as many at once asSUPERGLM_N_JOBSallows (the physical cores by default; at most one per 600 MB ofSUPERGLM_MAX_MEMORY), each saving its kernels to Numba’s cache, and then loads them into this process; with one worker it compiles here. Cost depends on the platform and cache contents. A smaller prediction compiles nothing, so a service of quotes does not need it. Kernels few fits reach compile on first use instead and then join the cache: the third and fourth derivatives aSuperLSSfit needs only at a smoothing-parameter endpoint, a fit’s diagnostics, and a few rarely run fallbacks. Numba keys its cache to the CPU model, so a cache built on one node type compiles again on another. See the how-to Starting fast on ephemeral clusters.