Skip to content

Commit 743400e

Browse files
talgalilimeta-codesync[bot]
authored andcommitted
Reorganize CHANGELOG.md for 0.21.0 release
Summary: Reorganizes the CHANGELOG.md entries for the balance project: - Folds the unreleased 0.22.0 section into 0.21.0 and updates the release date to 2026-06-02. - Moves the all-zero weights `UserWarning` change and the removal of scheduled migration `FutureWarning`s from New Features into the Code Quality & Refactoring section. - Moves the CLI `--formula` JSON list support entry into 0.21.0's New Features. - Removes blank separator lines between bullet items for a more compact layout. Differential Revision: D107231296 fbshipit-source-id: f10d33bd08a79f81f10bc30c77647753f869f3b3
1 parent b318c47 commit 743400e

1 file changed

Lines changed: 17 additions & 35 deletions

File tree

CHANGELOG.md

Lines changed: 17 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
1-
# 0.22.0 (Unreleased - TBD)
2-
3-
## New Features
4-
5-
- **CLI `--formula` now accepts JSON lists for model-matrix formula lists.**
6-
In addition to a single formula string, CLI users can pass values such as
7-
`--formula='["age", "gender"]'`, which are parsed and forwarded as
8-
`list[str]` to IPW/CBPS model-matrix construction. Malformed, empty, or
9-
non-string JSON lists now fail during argument parsing.
10-
11-
# 0.21.0 (2026-05-29)
1+
# 0.21.0 (2026-06-02)
122

133
## New Features
144

@@ -29,7 +19,6 @@
2919
threshold default resolving to the cobalt 0.1 cutoff for ASMD only.
3020
`.plot(dist_type="love_plot", library=...)` (or the `"love"` alias) routes
3121
covariate views to the same diagnostic.
32-
3322
- **Rake now supports fit-time metadata persistence and `predict_weights()`
3423
reconstruction.**
3524
- `rake(..., store_fit_metadata=True)` stores contingency-table artifacts
@@ -44,7 +33,6 @@
4433
`transformations="default"` and for explicit dicts that directly
4534
reference data-dependent helpers (`quantize`, `fct_lump`). Pass
4635
deterministic transformations at fit time or re-fit on the scoring data.
47-
4836
- **Poststratify now supports transfer scoring with `predict_weights(data=...)`.**
4937
`BalanceFrame.fit(method="poststratify", store_fit_metadata=True)` stores
5038
the transformation origin needed to safely replay fitted cell ratios on a
@@ -54,7 +42,6 @@
5442
`transformations="default"` and direct `quantize` / `fct_lump` references.
5543
Pre-0.21.0 pickles lack `transformations_origin` and must be re-fit for
5644
transfer scoring; in-place `predict_weights()` continues to work.
57-
5845
- **`balance.interop.diff_diff`** — thin adapter to
5946
[diff-diff](https://github.com/igerber/diff-diff) (`>=3.3.0,<4`) for
6047
survey-weighted Difference-in-Differences. Provides `to_survey_design()`,
@@ -67,7 +54,6 @@
6754
live in `balance/interop/_common.py` and column-name conventions in
6855
`balance/interop/conventions.py` so a future `balance.interop.svy` adapter
6956
can reuse them.
70-
7157
- **`balance.stats_and_plots.weights_stats.kish_deff_stats`** — bundled
7258
Kish-design-effect diagnostic returning a `KishStats(deff, ess, essp)`
7359
namedtuple. Computes `design_effect` once and derives ESS and ESSP from it,
@@ -76,26 +62,17 @@
7662
over the existing `design_effect`. `BalanceFrame._design_effect_diagnostics`
7763
now routes through `kish_deff_stats` so the canonical Kish identities live
7864
in one place.
79-
8065
- **`BalanceFrame.adjustment_history` records compound adjustment steps.**
8166
Sequential `adjust()` / `set_fitted_model()` workflows now keep a
8267
chronological, best-effort read-only copy of each adjustment step while
8368
preserving `model` as the latest fitted model for backwards compatibility.
8469
Baseline resets such as `set_as_pre_adjust()` clear the history together
8570
with the current model.
86-
87-
- **All-zero weight inputs to `_check_weights_series_are_valid` now emit a
88-
`UserWarning`** (when `require_positive=False`, the default). Previously,
89-
weighted statistics over an all-zero weight vector silently produced `NaN` /
90-
`inf` (`sum(w*x)/sum(w) = 0/0`). Callers that already passed
91-
`require_positive=True` (e.g. `design_effect`, `nonparametric_skew`,
92-
`prop_above_and_below`, `weighted_median_breakdown_point`) keep their
93-
`ValueError` behaviour. This affects internal callers like
94-
`descriptive_stats``asmd`, which previously masked the failure mode.
95-
96-
- Removed the scheduled migration `FutureWarning`s from `SampleFrame.weight_column`,
97-
`SampleFrame.id_column`, and `BalanceFrame.id_column`; the accessors continue to return
98-
column names, while `weight_series` and `id_series` return data.
71+
- **CLI `--formula` now accepts JSON lists for model-matrix formula lists.**
72+
In addition to a single formula string, CLI users can pass values such as
73+
`--formula='["age", "gender"]'`, which are parsed and forwarded as
74+
`list[str]` to IPW/CBPS model-matrix construction. Malformed, empty, or
75+
non-string JSON lists now fail during argument parsing.
9976

10077
## Bug Fixes
10178

@@ -106,7 +83,6 @@
10683
matching `poststratify` semantics and ensuring weighted marginals recover
10784
the target distribution when design weights are non-uniform. No-op when
10885
design weights are uniform (the common case).
109-
11086
- **`rake()` now gracefully handles single-variable adjustments.** When
11187
`rake(...)` resolves to exactly one adjustment variable, it logs a warning
11288
and delegates to `poststratify(...)` instead of raising an assertion. This
@@ -115,12 +91,10 @@
11591
`BalanceFrame.fit(method="rake")` more robust for one-variable inputs. In
11692
this delegated path, model metadata records `method='poststratify'` while
11793
returned weights keep the canonical `rake_weight` name.
118-
11994
- **CLI `--num_lambdas` now parses as a positive integer.** Fractional,
12095
zero, negative, and non-numeric values fail fast during argument parsing
12196
instead of being accepted after coercion/truncation or failing later
12297
during IPW adjustment.
123-
12498
- **Validation-path cleanup in `asmd`, `poststratify`, and `rake`** removes
12599
redundant/unreachable branches with no behavior loss:
126100
- `asmd(...)` uses a single authoritative invalid-`std_type` error path
@@ -131,7 +105,6 @@
131105
`_cell_ratio_tmp`, `_cell_ratio_tmp2`, ...).
132106
- `rake._predict_weights_from_model(...)` uses already-validated fit-time
133107
target weights directly for non-transfer replay.
134-
135108
- **Security: `ws` updated from 8.20.0 to 8.20.1** in website dependencies.
136109
Fixes CVE-2026-45736 (GHSA-58qx-3vcg-4xpx): uninitialized memory disclosure
137110
in `websocket.close()` when a `TypedArray` is passed as the reason argument.
@@ -147,7 +120,6 @@
147120
(`HomepageFeatures.js`) gain matching cross-references;
148121
`.github/copilot-instructions.md` gets a new review-checklist bullet for
149122
changes that touch `balance/interop/diff_diff.py`.
150-
151123
- **Survey-weighted DiD tutorial.** New
152124
`tutorials/balance_diff_diff_brfss.ipynb` walks through a BRFSS-style
153125
staggered-adoption smoking-ban DiD use case end-to-end: load synthetic
@@ -162,6 +134,17 @@
162134

163135
## Code Quality & Refactoring
164136

137+
- **All-zero weight inputs to `_check_weights_series_are_valid` now emit a
138+
`UserWarning`** (when `require_positive=False`, the default). Previously,
139+
weighted statistics over an all-zero weight vector silently produced `NaN` /
140+
`inf` (`sum(w*x)/sum(w) = 0/0`). Callers that already passed
141+
`require_positive=True` (e.g. `design_effect`, `nonparametric_skew`,
142+
`prop_above_and_below`, `weighted_median_breakdown_point`) keep their
143+
`ValueError` behaviour. This affects internal callers like
144+
`descriptive_stats``asmd`, which previously masked the failure mode.
145+
- Removed the scheduled migration `FutureWarning`s from `SampleFrame.weight_column`,
146+
`SampleFrame.id_column`, and `BalanceFrame.id_column`; the accessors continue to return
147+
column names, while `weight_series` and `id_series` return data.
165148
- Diagnostics construction now wires `adjustment_failure` metadata from model
166149
outputs when available (instead of hardcoding success), and supports an
167150
optional `adjustment_failure_reason` diagnostics row for richer failure
@@ -175,7 +158,6 @@
175158
- Expanded targeted test coverage for predict-time metadata validation,
176159
replay/transfer edge cases, and error/warning paths in
177160
`weighted_comparisons_stats`, `poststratify`, and `rake`.
178-
179161
- **CI matrix entry for diff-diff integration.** The `Build and Test` workflow
180162
exercises `tests/test_interop_diff_diff.py` on Python 3.12 against both the
181163
minimum pin (`==3.3.0`) and the resolved-latest within `>=3.3.0,<4`, via

0 commit comments

Comments
 (0)