Releases: raphaelrrcoelho/causalrl
Release list
v3.0.0 — RL recentering, and the follow-through
The first release since 2.1.0. Two bodies of work land together: the RL recentering (everything the library ships must be reachable from agents/ or envs/), and the follow-through that finished what the recentering started.
The correction
3.0 gave the planning half of the library richer types (Intervention, FeatureTransition) and stopped. certify_policy and conformal_action_value still took Sequence[int], so an InterventionalAgent's output could not reach the functions the README points it at without an arm codebook — inverting both the headline claim and the stated maturity split. LoggedDecisions states what off-policy certification actually needs from a log, and both functions are now generic in the action type.
Refusals that became answers
fit_scm_bounded— bounds the confounded mechanisms instead of refusing the graph. The split is per node and finer than "the graph is confounded": only a bidirected edge to a node's own parent breaks its mechanism.CausalGraph.assert_complete_parents(...)— asserts a node has no unobserved parents (randomisation, a feature flag, a rule-based policy). Converts BOUNDED to IDENTIFIED, with a mandatory reason recorded in the certificate.localize_mechanism_shift— closes the transport loop. Invariance holds exactly whenV ⊥ regime | Pa(V), so this is the library's own CI test, emitting the selection setidentify_transportconsumes.
Decisions in real time
Anytime+AnytimeInterventionSearch—Deadlineshipped in 3.0 with no consumer. It has one now, and a search stopped by its clock carries abudget-truncatedhedge rather than presenting a partial sweep as exhaustive.Continuous(lo, hi)intervention domains — a dose, a budget, a duration. An interval has no arm list, so deciding over one is a search.TrajectoryLogBuilder— build a log while the producer runs; fingerprint-identical tofrom_rows.
Honesty about what a number is worth
confidence_sequence/sequential_policy_comparison— valid under unlimited peeking, so "run until the band excludes zero" is a legitimate stopping rule. Scope is stated: sampling error, not confounding.certify_fitted_query— a fidelity gate, not a calibrated counterfactual interval. Tests the mechanism where it is testable and downgrades when it fails.
Performance and correctness
conditional_mutual_informationis 5–10× faster and bit-identical.- The PC/FCI skeleton is now PC-stable. The old loop read adjacency while removing from it, so
discover's output could depend on the order the variables were passed in. This can change the graph returned on data where that order-dependence was active.
Full detail, including every breaking change and its migration, in CHANGELOG.md.
v2.1.0 — Phase 5: experimental cyclic SCMs
Phase 5 — a first, experimental layer for cyclic (feedback) SCMs under causalrl.experimental.cyclic: CyclicCausalGraph + σ-separation (via the Forré-Mooij acyclification, coinciding with d-separation on DAGs by construction), LinearCyclicSCM (equilibrium solve/sample or a typed hedge — never an arbitrary solution), and compare_equilibrium_unrolling → Certificate. On the 2.x-experimental track: outside semver guarantees until promoted out of experimental/; nothing in the stable API imports it. See CHANGELOG.md.
v2.0.0 — Phase 4: interop & the 2.0 flip (first stable major)
The first stable major. One breaking change: identify_effect, ipw_sensitivity_bounds, and msm_policy_value_bounds now return a unified Certificate by default — pass return_certificate=False for the legacy Estimand/Interval (a supported, non-deprecated escape hatch wrapping the identical numerics). Announced by a FutureWarning since 1.5; see docs/migration-2.0.md.
Plus additive interop so any external stack can drive the certificate layer: SBI/NumPyro → Regime bridge, a deepened d3rlpy path (both-direction MDPDataset, FQE), a generic columnar-simulator adapter, and the §12.4 generality lint. See CHANGELOG.md.
v1.7.0 — Phase 3: scale & data plane
Phase 3 — the same certificates at simulator scale: single-pass streaming estimators over columnar TrajectoryLogs (in-memory or streamed from Parquet), plus an optional JAX backend mirroring the NumPy numerics. Fully additive; every new routine returns a unified Certificate. See CHANGELOG.md for details.
v1.6.0 — Phase 2: multi-agent core
Phase 2 — first-class multi-agent causal decision problems: magames/ (typed AgentType/Population, LearnerTopology-capped certify_equilibrium under interventions, per-agent CausalEnv views for single-learner OPE), a duck-typed PettingZoo ParallelEnv → TrajectoryLog adapter, and an experimental causalrl.meanfield. Additive, no new dependencies. Full notes: CHANGELOG.md.
v1.5.0 — Phase-1 continuous-core completion
Ships the five items 1.4.0 deferred: conditional normalizing-flow mechanisms + generalized exact abduction, NUTS/NumPyro posterior abduction (new [numpyro] extra), sequential DR/LTMLE, hedge-first sequential-transport estimation, and the 2.0 certificate-default-flip FutureWarning (I9). Additive; byte-pin preserved. Full notes: CHANGELOG.md.
v1.4.0 — Phase 1: continuous causal core
Phase 1 — identification-aware DR/DML estimation (certify_effect), estimated-propensity MSM + heavy-tail/quantile bounds, finite-sample conformal wrappers, data-plane transport estimation, and continuous neural mechanisms with posterior abduction ([torch]). Fully additive; every new routine returns a unified Certificate. Full notes: CHANGELOG.md.
v1.3.0 — Phase 0: 1.x consolidation
Phase 0 — the 1.x consolidation: unified Certificate protocol (Kind IDENTIFIED/BOUNDED/EMPIRICAL, JSON round-trip, as_certificate adapters for the shipped certificate types), columnar TrajectoryLog ([data] extra) with a lossless ConfoundedTrajectoryDataset bridge, Regime, structural protocols, and graph_hash. Fully additive; the certify_decision byte-pin and bench_causal_core guards are preserved. Full notes: CHANGELOG.md.
v1.2.0
The decision certificate becomes the ecosystem's confounding-robustness front door, and gains a confounded-offline-RL scale path. Backward compatible with 1.0 — certify_decision's raw-logs behaviour is byte-for-byte unchanged (pinned by a regression test).
Decision front door
certify_estimate+PolicyValueContrast— certify any off-policy value contrastV(π_on) − V(π_off)against hidden confounding through one typed seam.certify_decisionis now a thin wrapper over it and also accepts a pre-builtestimate=.DecisionCertificate.recommendation— a computed"act"/"abstain"verdict, so callers read the confounding-robustness verdict rather than the (possibly confounded) naivedecision.- DoWhy + EconML interop adapters (
causalrl.interop, optional[interop]extra) — hand a fitted DoWhy propensity estimate or an EconML CATE-induced policy straight to the certificate. Duck-typed; the library core never imports them.
Scale path — d3rlpy trains, causalrl certifies
certify_policy— certify a learned policy's value improvementV(π) − V(behaviour)under Tan's marginal sensitivity model; the policy is supplied as its chosen actions, so no trainer dependency.causalrl.scale.d3rlpy.to_mdp_dataset(optional[scale]extra) — bridge aConfoundedTrajectoryDatasetinto a d3rlpyMDPDataset.
Honest scope (unchanged rule): MSM sensitivity is on the logging propensities (sharp when target supports are disjoint, valid-but-conservative otherwise); the EconML adapter is MSM-only; the scale contrast is one-step / terminal-return. Full details in the CHANGELOG.
v1.0.0 — first stable release + certify_decision
First stable release. The public API converged over the 0.99.x line is now committed to under semantic versioning; the package is promoted to Production/Stable.
Added
causalrl.certify_decision+DecisionCertificate— a one-call decision-certificate front door over the documented decision stack: the sign-robustness certificate (pivotality_certificate) and, when logging propensities are supplied, the marginal-sensitivity-model tipping point (tipping_gammaovermsm_contribution_bounds), returning a human-readable verdict. No new theory; one-sided by construction (failure to certify is not evidence of a flip).
Changed
- Development status promoted from Beta to Production/Stable.
Full changelog: https://github.com/raphaelrrcoelho/causalrl/blob/main/CHANGELOG.md