Skip to content

Fix docs: flat YAML format, correct class/param names, CLI accuracy#106

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

Fix docs: flat YAML format, correct class/param names, CLI accuracy#106
cweniger merged 1 commit into
mainfrom
fix/docs-audit

Conversation

@cweniger

Copy link
Copy Markdown
Owner

Summary

Two-pass audit of all documentation against the actual source code, fixing incorrect or misleading content that would cause failures if followed verbatim.

Critical fixes

  • Flat YAML format (docs/api/flow.md, docs/api/gaussian.md, docs/configuration.md, docs/getting-started.md): The docs described fictional nested YAML groups (loop:, network:, optimizer:, inference:) under estimator:. These keys are not valid Flow.__init__ arguments and would raise TypeError at runtime. All examples now use the correct flat format matching the actual working examples in examples/.

  • Class name GaussianGaussianFullCov (multiple files): The class Gaussian was never defined or exported — only GaussianFullCov exists in gaussian_fullcov.py. from falcon.estimators import Gaussian would raise AttributeError.

  • DiagonalWhitener YAML example (docs/api/embeddings.md): Missing required dim argument — would raise TypeError on instantiation.

Parameter name fixes

  • scheduler_patiencelr_patience (actual Flow/GaussianFullCov param)
  • use_best_models_during_inferenceuse_best_models
  • Logged metric names: loss/traintrain:loss, loss/valval:loss, best_val_losscheckpoint:conditional / checkpoint:marginal
  • buffer.max_epochs (nonexistent) → buffer.max_samples in CLI override example

Installation / CLI fixes

  • pip install -e ".[monitor]"".[all]" in README ([monitor] extra never existed)
  • pip install -e .".[all]" in docs/index.md (bare install lacks sbi, which Flow requires)
  • paths.importpaths.imports (correct key name, list type)
  • Python 3.9+Python 3.10+ (matches pyproject.toml)
  • Removed falcon monitor from CLI table (doesn't exist; TUI launches automatically in falcon launch)
  • Added ppd to falcon sample synopsis

Missing / incomplete API docs

  • setup() added to BaseEstimator members list (it is @abstractmethod)
  • add_node() added to Graph members list (main Python API for programmatic graph construction)
  • Removed non-existent FlowConfig, NetworkConfig, OptimizerConfig, InferenceConfig class references from flow.md
  • Added missing Flow parameters: prior_epochs, betas, device
  • Added undocumented buffer fields: simulate_chunk_size, initial_samples_path
  • lognormal distribution: noted it only works with mode="standard_normal" (raises ValueError with mode="hypercube")
  • Updated package tree in api/index.md: gaussian_fullcov, stepwise_base, networks, embedded_posterior
  • Fixed GaussianFullCov class reference path (gaussian_fullcov module, not gaussian)

Test plan

  • Verify YAML examples in docs/getting-started.md and docs/configuration.md run without error against examples/01_minimal
  • Verify from falcon.estimators import GaussianFullCov succeeds
  • Verify falcon sample ppd is accepted by the CLI
  • Build docs site and confirm no broken mkdocstrings references

🤖 Generated with Claude Code

…ames

Two-pass audit of all docs against source code. Key fixes:

- Replace fictional nested YAML groups (loop/network/optimizer/inference)
  with the correct flat format — nested keys would raise TypeError at runtime
- Rename Gaussian → GaussianFullCov throughout (class never existed as Gaussian)
- scheduler_patience → lr_patience (actual Flow/GaussianFullCov param name)
- use_best_models_during_inference → use_best_models
- Logged metric names: loss/train → train:loss, loss/val → val:loss
- pip install -e ".[monitor]" → ".[all]" (monitor extra never existed)
- pip install -e . → ".[all]" in docs/index.md (Flow requires [sbi] extra)
- paths.import → paths.imports (correct key name, list type)
- Python 3.9+ → 3.10+ (matches pyproject.toml)
- Remove falcon monitor CLI (doesn't exist; TUI is part of falcon launch)
- Add ppd to falcon sample synopsis
- Add setup() to BaseEstimator members list
- Add add_node() to Graph members list
- DiagonalWhitener YAML example: add required dim argument
- Remove non-existent FlowConfig/NetworkConfig/OptimizerConfig/InferenceConfig
  class references from flow.md
- Add missing Flow params: prior_epochs, betas, device
- Add undocumented buffer fields: simulate_chunk_size, initial_samples_path
- lognormal distribution: note it only works with mode="standard_normal"
- Update package tree in api/index.md (gaussian_fullcov, stepwise_base, etc.)
- Fix GaussianFullCov class reference path (gaussian_fullcov module)
- buffer.max_epochs → buffer.max_samples in CLI override example

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@cweniger cweniger merged commit 2b137a6 into main Jun 22, 2026
4 checks passed
@cweniger cweniger deleted the fix/docs-audit branch June 22, 2026 22:55
@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 (6560353) to head (e252be9).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #106   +/-   ##
=======================================
  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