warmup

warmup

Pre-compile the estimator kernels so no real fit pays a cold start.

  • With no arguments only built-in shapes are warmed: the compile cache is keyed by shape.
  • Pass the real data, n_mc and transformations to warm the shapes you will fit.

Functions

Name Description
warmup Run every estimator path once, populating the persistent compile cache.

warmup

warmup(
    data=None,
    *,
    y=None,
    x=None,
    area=None,
    pop_data=None,
    transformations=('boxcox',),
    threshold=None,
    n_mc=200,
    rng=0,
    verbose=True,
)

Run every estimator path once, populating the persistent compile cache.

Returns {path: seconds}. Without data, a fit on differently shaped data still compiles.

Parameters

Name Type Description Default
data Survey microdata, as for UnitLevel. None uses the synthetic dataset. None
y str | None As for UnitLevel.ebp; needed with data. The area-level path fits data aggregated to areas. None
x str | None As for UnitLevel.ebp; needed with data. The area-level path fits data aggregated to areas. None
area str | None As for UnitLevel.ebp; needed with data. The area-level path fits data aggregated to areas. None
pop_data str | None As for UnitLevel.ebp; needed with data. The area-level path fits data aggregated to areas. None
transformations Sequence[str] Transformations of the EBP paths to warm. ('boxcox',)
threshold Poverty line of the EBP paths. None takes 0.6 times the median of y. None
n_mc int As for UnitLevel.ebp. It is compiled into the simulation kernels, so pass the value the real fits will use. 200
rng int Seed for the warmup fits. 0
verbose bool Log each path’s time. True