Skip to content

PyMC 6 migration: final QA — integration suite, behavioral baselines vs pymc 5, release prep #1048

Description

@cetagostini

Part of #1038. Final gate before merging the integration branch into main. Depends on all other child issues.

Goal

Prove the migrated stack is behaviorally equivalent (where intended) and release-ready, then merge pymc6_and_pymcmarketing1_migrationmain.

Tasks

  • Full test suite in the migration env, including integration/slow markers and doctests (CI matrix 3.12 and 3.14).
  • Numerical baseline comparison vs pymc 5: for a fixed seed, compare a representative set of outputs (effect summaries, HDI tables, R² scores, counterfactual predictions) between current main (pymc 5 env) and the integration branch. Document any drift beyond MC noise — expected sources: sampler differences, arviz interval policy (must stay 0.94 HDI), draw-wise R² (must be identical).
  • pandas 3 sweep: pandas 3.0.x arrives transitively (copy-on-write default, string-dtype changes). The suite is green, but scan causalpy/data/simulate_data.py and the experiments for chained-assignment patterns and dtype assumptions.
  • Deprecation cleanup: LevelTrendComponentLevelTrend (pymc-extras statespace; causalpy/pymc_models.py:2335); note the pymc-extras BSplineBasis.infer_shape fgraph DeprecationWarning resolves only with pymc-extras ≥0.13 (which needs pymc ≥6.1 — blocked by pymc-marketing's <6.1 cap; document, don't force).
  • Docs note on the new runtime characteristics: numba is the default pytensor backend (hard dep, noticeable first-compile latency; native crashes replace Python tracebacks in workers), and nutpie becomes pymc's default NUTS sampler only if installed (400 tune-step default vs pymc's 1000) — consider recommending it in the installation docs.
  • Changelog/release notes: breaking-change section (Python ≥3.12, pymc ≥6.0.1, arviz ≥1.1; idata objects are now xarray.DataTree). Decide version bump (this is a major/breaking release).
  • Open the final PR: pymc6_and_pymcmarketing1_migrationmain.

Acceptance criteria

  • Everything green (unit, integration, doctests, notebooks, docs build, lint) on the integration branch.
  • Baseline-comparison report attached to this issue.
  • Final PR to main opened with the breaking-changes summary.

Workflow

Branch from pymc6_and_pymcmarketing1_migration; open PRs with base pymc6_and_pymcmarketing1_migration (not main) — except the final merge PR described above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions