Start here
from_frame
Section titled “from_frame”from_frame(frame, shape, unit, group, date, control, metrics, experiment_id, design, plan, uptake, on_unassigned, cluster, intervention_grain, exposure_date, observation_end, breakouts)Build an experiment from a unit-summary or unit-panel frame.
Each shape accepts only the keywords its overload declares.
from_switchback_frame
Section titled “from_switchback_frame”from_switchback_frame(frame, unit, cycle, period, step, group, metrics, identification, assignment, experiment_id, plan, contrast_references)No docstring.
load_definitions
Section titled “load_definitions”load(path)Inspect experiment and metric declarations without a warehouse connection.
Accepts a single file or a directory of **/*.yaml/**/*.yml
files, merged and validated. Raises DefinitionError on invalid
YAML, invalid SQL, duplicate names, or dangling references.
from_definitions
Section titled “from_definitions”from_definitions(definitions_path, con, experiment_name, backend, store, on_mixed_assignment, source_snapshot_evidence, catalog_path)Bind warehouse definitions, including selected portable metrics, or reopen offline.
catalog_path names the catalog file and puts its lock in the same
directory. Use the same path to reopen offline. Omit it to keep both
files beside the definitions.
from_unit_day_artifact
Section titled “from_unit_day_artifact”from_unit_day_artifact(store, ref, expected_context, verification)No docstring.
from_moments
Section titled “from_moments”from_moments(rows, metrics, control, experiment_id, design, plan)No docstring.
run(experiment, reader, views, run_id, results_store, decision_log, capture, execution_context, decision_method, sensitivity_methods, prior, metrics, estimands, value_scale, exploratory_metrics, population, coherence)Run an experiment through its reader.
views selects declared experiment views by hash, in declaration order.
None executes all declared views in one capture. Only the readout
options set by the caller apply; coherence defaults to the experiment’s
saved value, else captured. A population must match every selected
view, which declares it. results_store and decision_log save or log
the run under the experiment’s registration, checked before the source is
read; run_id is generated when omitted.
ExperimentReader
Section titled “ExperimentReader”ExperimentReader(binding, experiment, catalog_writer, definitions_guard)Read the data behind one experiment for run and the functions that read data.
A builder returns it with the experiment. A dataframe reader reads the frame it
was built from, a warehouse reader reads the warehouse live on every call, and an
offline reader restored from a saved catalog cannot read. Use it in a with
block or call close(); afterwards every read refuses, so build a new reader to
read again. Closing never closes a connection you supplied.
RunResult
Section titled “RunResult”RunResult(cells, effects, decisions, run, live_rows, _scoped, _row_models, _input_backend)No docstring.
render
Section titled “render”render(envelope, audience)No docstring.
runnable
Section titled “runnable”runnable(exp, metric)Conservative offline feasibility: absent declarations remain unknown.
increment.runnable(experiment, metric) returns a Runnable for each method.
Its static_refusals are known incompatibilities, deferred_checks need data,
and unknown requirements cannot be established offline. No static refusal
is not a promise that execution will succeed; see
checking an experiment.
MetricTrends
Section titled “MetricTrends”MetricTrends(defs, con)Evaluate governed metrics over calendar time - no experiment.
An omitted end date resolves the selected metric’s own fact horizon
through a bounded aggregate when the trend is constructed.
MetricTrends.metrics resolves each selected metric independently. The
default edge is therefore a snapshot, and ranges beyond the ten-year
calendar capacity refuse before a trend is returned. Population SQL and
the required unit_id key are admitted before this data query.
Usage::
trends = MetricTrends.from_definitions("definitions/", con)trend = trends.metric("purchase_rate", grain="week", start=dt.date(2026, 1, 1))trend.to_frame()Definitions
Section titled “Definitions”DefinitionsTop-level semantic definitions loaded from a directory or YAML file.
Construct it with the validated source, metric, exposure, and experiment
declarations, or obtain it from :func:increment.load_definitions.
increment.__version__ reports the installed package version.
Experiment is the immutable execution specification. ExperimentDefinition
is the experiment declaration written in definitions and returned by
increment.workflows.experiment_definition; custom evidence providers use it
for experiment metadata.
ExperimentDefinition
Section titled “ExperimentDefinition”ExperimentNo docstring.