Skip to content
CAI
Software that uses CAICheck a score

facebookresearch/balance

60.0

Adequate · 17 November 2026

28.3k

lines of production code

Python

primary language

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

Behavioural changes

17 commits (0 fixes) modifying scripts

A change to existing behaviour in scripts — 17 commits, 1 file: “Add export NODE\_OPTIONS=--openssl-legacy-provider to build script (\#6)”; “Initial commit”; “Adding a new notebook for comparing CBPS results in R vs Python”; and 14 more (refs \#6, \#388, \#7, \#270, \#131, …).

scripts · medium confidence · unverified

3 commits (0 fixes) modifying website

A change to existing behaviour in website — 3 commits, 5 files: “Use the patched image parser without losing Docusaurus dimensions”; “Mitigate deepmerge prototype poisoning locally pending an upstream release”; “Replace unpatched deepmerge with the released Fastify engine”.

website/scripts, website/test · medium confidence · unverified

329 commits (29 fixes) modifying (repo-wide)

A change to existing behaviour in (repo-wide) — 329 commits (29 fixs), 10 files: “Remove noncontributing rows before weighted quantiles”; “Reject missing CLI batch keys explicitly”; “Adding the fix\_columns\_names argument to \_prepare\_input\_model\_matrix”; and 326 more (refs \#489, \#260, \#341, \#506, \#526, …).

(repo-wide) · low confidence · unverified

393 commits (49 fixes) modifying balance

A change to existing behaviour in balance — 393 commits (49 fixs), 48 files: “upgrade pyre version in \fbcode/core\_stats\ - batch 1”; “Remove noncontributing rows before weighted quantiles”; “Remove unused type error suppressions - core\_stats”; and 378 more (refs \#260, \#341, \#506, \#526, \#405, …).

balance · medium confidence · unverified

4 commits (0 fixes) modifying benchmarks

A change to existing behaviour in benchmarks — 4 commits, 1 file: “Optimize rake by replacing ipfn with vectorized IPF (\#135)”; “Convert benchmark\_ipfn.py to pyre-strict”; “apply Black 25.11.0 style in fbcode (76/92)”; and 1 more (refs \#135).

benchmarks · medium confidence · unverified

5 commits (0 fixes) modifying sphinx

A change to existing behaviour in sphinx — 5 commits, 4 files: “Enable syntax highlighting on codeblocks”; “Initial commit”; “Release — version 0.19.0, changelog (\#398)”; and 2 more (refs \#398, \#454).

sphinx · medium confidence · unverified

5 commits (0 fixes) modifying website/src

A change to existing behaviour in website/src — 5 commits, 6 files: “Initial commit”; “Relicense Docusaurus website assets GPLv2 -\> MIT (\#454)”; “Polish frontpage styling”; and 2 more (refs \#454, \#7, \#461).

website/src · medium confidence · unverified

5 commits (0 fixes) modifying website/static

A change to existing behaviour in website/static — 5 commits, 29 files: “uploading slides from ISA conference (2023-06-01)”; “Add CNAME to static assets”; “Upload all logo assets to the github repo”; and 2 more (refs \#461).

website/static · medium confidence · unverified

63 commits (3 fixes) modifying tutorials

A change to existing behaviour in tutorials — 63 commits (3 fixs), 11 files: “Simplify quickstart tutorial by removing redundant diagnostic sections (\#328)”; “Add configurable high-cardinality threshold (\#286)”; “Fix typos in documentation and tutorials (\#310)”; and 60 more (refs \#328, \#286, \#310, \#532, \#300, …).

tutorials · medium confidence · unverified

9 commits (3 fixes) modifying website

A change to existing behaviour in website — 9 commits (3 fixs), 4 files: “Fix edit URL (\#14)”; “Back out "Fix baseurl for public site"”; “Update dependencies to avoid build errors (\#434)”; and 6 more (refs \#14, \#434, \#454, \#7, \#131).

website · medium confidence · unverified

Test coverage

1 commit adding/updating tests in (repo-wide); 1 commit adding/updating tests in tests/r\_inspired/fixtures/weighted\_scaler/licenses/packages/Rcpp, tests/r\_inspired/fixtures/weighted\_scaler/licenses/packages/RcppEigen, tests/r\_inspired/fixtures/weighted\_scaler/licenses/packages/glmnet; 12 commits adding/updating tests in tests; 353 commits adding/updating tests in tests.

Dependencies

114 commits updating dependencies (4 manifests)

A dependency / build maintenance change in (dependencies) — 114 commits (14 fixs), 4 files: “Fix high/moderate npm security vulnerabilities in website dependencies (\#542)”; “security: bump ws 8.20.0 → 8.20.1 ([CVE redacted]) (\#489)”; “Adopt patched diagram and math renderers”; and 111 more (refs \#542, \#489, \#529, \#509, \#86, …).

(dependencies) · high confidence · unverified

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 60.0.

Lenses

  • Code Health 56.5
  • Architecture 97.2
  • Maturity 66.3
  • Readiness 67.0
  • Security 55.4

Changes since last survey

  • 300 commits — 275 feature/other, 25 fixes

By area

  • (root) — 134 commits
  • website/yarn.lock — 26 commits
  • website/package.json — 18 commits
  • tests/r_inspired — 14 commits
  • balance/balance_frame.py — 13 commits
  • balance/weighting_methods — 13 commits
  • .github/workflows — 7 commits
  • balance/stats_and_plots — 7 commits
  • balance/balancedf_class.py — 5 commits
  • balance/utils — 5 commits
  • tests/test_ipw.py — 4 commits
  • tests/test_sample.py — 4 commits
  • docs/architecture — 3 commits
  • tests/test_ascii_plots.py — 3 commits
  • tests/test_e2e_from_tutorials.py — 3 commits
  • tests/test_rake.py — 3 commits
  • website/scripts — 3 commits
  • (repo) — 2 commits
  • balance/outcome_models — 2 commits
  • balance/sample_frame.py — 2 commits

Notable commits

  • fix: (#504) Add regression test for CBPS rank-deficient SVD handling (#507)
  • fix: Add changelog conventions, fix past release notes
  • fix: Add run_balance_tests.sh using bento kernel + fix plotly renderer in conftest
  • fix: Demonstrate active-weight selection with a two-row regression
  • fix: Document _CallableBool dual-use pattern + fix Sample.from_frame return type
  • fix: E2e tutorial regression tests
  • fix: Fix PYRE_MISSING_ANNOTATIONS issue in fbcode/core_stats/balance/parent_balance/tests/test_util_data_transformation.py
  • fix: Fix PYRE_MISSING_ANNOTATIONS issues in fbcode/core_stats/balance/parent_balance/tests/test_ipw.py
  • fix: Fix PYRE_MISSING_ANNOTATIONS issues in fbcode/core_stats/balance/parent_balance/tests/test_ipw.py
  • fix: Fix Pyre errors in _build_training_model_matrix penalty_factor handling
  • fix: Fix Pyre type errors in build_design_matrix helpers (#411)
  • fix: Fix _build_diagnostics crash on None model_dict
  • fix: Fix rake() ignoring per-row design weights in final weight assignment (#432)
  • fix: Fix broken fbcode//core_stats/balance:balance_tests_pss2-cpython3.12 - test_adjust_hgb_
  • fix: Fix broken website build: replace Meta-internal npm registry with public registry, patch two high-severity vulns (#483)
  • fix: Fix categorical model matrix labels (#525)
  • fix: Fix grey-zone API tests that use internal accessors
  • fix: Fix high/moderate npm security vulnerabilities in website dependencies (#542)
  • fix: Fix memory explosion in prepare_marginal_dist_for_raking due to unbounded LCM expansion (#370)
  • fix: Fix npm security vulnerabilities in website dependencies (#421)
  • …and 280 more

Architecture

  • 0 containers · 1 bounded contexts · 0 dependency edges (baseline)

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

facebookresearch/balance was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 17 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 88369df08df1ac1106cbe1075f2604d296a19e47 — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.85+preprod-eba6548ac50f.