Skip to content

Improve docs quality: explanations, terminology, missing sections#107

Merged
cweniger merged 1 commit into
mainfrom
fix/docs-quality
Jun 22, 2026
Merged

Improve docs quality: explanations, terminology, missing sections#107
cweniger merged 1 commit into
mainfrom
fix/docs-quality

Conversation

@cweniger

Copy link
Copy Markdown
Owner

Summary

Second-pass documentation quality pass — all non-functional issues: missing explanations, confusing phrasing, stale terminology, and incomplete sections. No code logic changed (except one docstring fix in svd.py).

Wrong/misleading content fixed

  • CLI override example had graph.theta.estimator.optimizer.lr — wrong path; correct flat path is graph.theta.estimator.lr
  • buffer.max_samples description said "disfavoured" (ambiguous internal term); now says "permanently removed"
  • gamma comment in configuration.md said "0=posterior, 1=prior" — inconsistent with flow.md; unified to "0=tight around posterior, higher=broader"
  • DynamicSVD.forward docstring said "Returns zeros before first SVD update"; actual code returns torch.randn — fixed

Missing documentation added

  • sample: config section was used in every example but never documented — added with posterior/ppd examples
  • scaffolds and resample node keys had no explanation beyond a one-word comment — clarified inline
  • flow-density.md: sbi/nflows net types (nsf, maf, etc.) require pip install falcon-sbi[sbi] — now stated; zuko_* types work by default
  • ToeplitzWhitener: exported from falcon.embeddings but missing from embeddings.md — added with YAML example
  • param_dim vs full_param_dim distinction in Product — added note in product.md
  • gamma semantics differ between Flow and GaussianFullCov — added explicit note in gaussian.md

Terminology / naming fixes

  • SNPE_gaussianGaussianFullCov in examples/04_gaussian/config.yml and examples/05_linear_regression/config.yml (old internal name; class is GaussianFullCov)
  • config.yamlconfig.yml in examples/01_minimal/config.yml resume comment
  • api/index.md package tree: flow_density, stepwise_base, networks, embedded_posterior now marked (internal)

Explanation improvements

  • cosine/sine/uvol distribution types now include use-cases (e.g. "pdf ∝ sin(θ) — use for declination-like angles")
  • lognormal restriction note now explains why (hypercube CDF path not implemented)
  • DynamicSVD YAML example expanded with buffer_size and momentum; DiagonalWhitener dim clarified as "must match flattened input size"
  • Getting started: simulator and observation code now have shape comments; note added explaining what happens when embedding: is omitted
  • ppd CLI entry now has a description: "forward model evaluated at posterior samples"
  • gamma in flow.md: removed "amortization" framing (has a different meaning in the SBI literature); replaced with plain description of proposal breadth

Test plan

  • Verify falcon launch buffer.max_samples=32768 graph.theta.estimator.lr=0.001 accepted by CLI
  • Verify docs build without broken references (mkdocs build)
  • Verify from falcon.embeddings import ToeplitzWhitener succeeds

🤖 Generated with Claude Code

…ology

- Fix CLI override example: graph.theta.estimator.optimizer.lr → .estimator.lr
  (no nested optimizer group; all params are flat)
- Clarify buffer.max_samples: "disfavoured" → "permanently removed (FIFO)"
- Fix gamma inline comment in configuration.md (was "0=posterior, 1=prior"
  which conflated two different framings; now "0=tight, higher=broader")
- Add missing sample: config section documentation with posterior/ppd examples
- Add scaffolds and resample inline comments explaining their purpose
- flow-density.md: note that sbi/nflows net_types require pip install [sbi];
  zuko_* types work by default; clarify "recommended" applies when sbi installed
- Fix DynamicSVD docstring: "Returns zeros" → "Returns random noise" (actual code)
- Replace SNPE_gaussian with GaussianFullCov in examples/04_gaussian and
  examples/05_linear_regression comment headers
- Fix examples/01_minimal: config.yaml → config.yml in resume comment
- product.md: improve cosine/sine/uvol distribution descriptions with use-cases;
  add param_dim vs full_param_dim note; clarify lognormal restriction with reason
- embeddings.md: add ToeplitzWhitener section and class reference; expand
  DynamicSVD YAML example with buffer_size and momentum; clarify DiagonalWhitener
  dim requirement
- api/index.md: mark flow_density, stepwise_base, networks, embedded_posterior
  as internal in the package tree
- gaussian.md: add prior_epochs to cross-ref list; add note explaining that
  gamma has different semantics in GaussianFullCov vs Flow
- flow.md: rewrite gamma explanation to avoid "amortization" framing which
  has a different technical meaning in the SBI literature
- getting-started.md: add shape comments to simulator and observation examples;
  add note explaining what happens when embedding is omitted; expand ppd
  description in CLI table

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@cweniger cweniger merged commit d08c81c into main Jun 22, 2026
4 checks passed
@cweniger cweniger deleted the fix/docs-quality branch June 22, 2026 23:15
@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 10.42%. Comparing base (2b137a6) to head (6a2e78a).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #107   +/-   ##
=======================================
  Coverage   10.42%   10.42%           
=======================================
  Files          30       30           
  Lines        3896     3896           
=======================================
  Hits          406      406           
  Misses       3490     3490           
Flag Coverage Δ
unit 10.42% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant