cleverly.Runtime#

class cleverly.Runtime(random_state: int | None = None, run_id: str | None = None, n_jobs: int = 1)[source]#

Configure reproducibility, provenance, and resources.

Parameters:
random_stateint or None, default=None

Seed for folds, learners, and resampling.

run_idstr or None, default=None

User-defined identifier stored in provenance.

n_jobsint, default=1

Maximum parallel jobs requested by the fit.

See also

TMLEMethod

Method configuration this object is the runtime half of.

cleverly.Provenance

Where run_id and the fit fingerprints are recorded.

cleverly.learners.set_thread_limit

Native threads per fit, which n_jobs does not set.

Examples

>>> from cleverly import Runtime
>>> runtime = Runtime(random_state=0, run_id="pilot-2026-03", n_jobs=4)
>>> runtime.random_state, runtime.run_id, runtime.n_jobs
(0, 'pilot-2026-03', 4)

Methods#

Attributes#

Runtime.n_jobs: int = 1#
Runtime.random_state: int | None = None#
Runtime.run_id: str | None = None#