Featuresmith Icon
Featuresmith
  • Docs
  • SDK
  • CLI
  • Examples
  • Roadmap
v0.4.0
Documentation

Getting Started

  • Introduction
  • Installation
  • Quick Start
  • Tutorial Notebooks
  • Benchmarks
  • Development Setup
  • Contributing

Core Concepts

  • Architecture Overview
  • Dataset Layer
  • Connectors
  • Profiling Engine
  • Rule Engine
  • Dataset Review Engine
  • ML Readiness Score
  • Target Leakage Detection
  • Dataset Diff Engine
  • Target Column Concept
  • Mental Model & Workflow
  • Interpreting Findings
  • Workflow Cheat Sheet
  • Beginner Glossary

Python SDK

  • load()
  • profile()
  • analyze()
  • review()
  • diff()
  • score()
  • plan()
  • Dataset
  • Data Models
  • Profile Models
  • Rule & Finding Models
  • Review Models
  • Score Models
  • Leakage Models
  • Diff Models
  • Exceptions
  • Plugins

CLI Reference

  • analyze
  • review
  • diff
  • score
  • plan
  • Configuration

Guides

  • CI/CD Integration
  • Custom Rules
  • Writing Plugins

Resources

  • Release Notes
  • FAQ
  • Troubleshooting
DocsGuide

Getting Started

  • Introduction
  • Installation
  • Quick Start
  • Tutorial Notebooks
  • Benchmarks
  • Development Setup
  • Contributing

Core Concepts

  • Architecture Overview
  • Dataset Layer
  • Connectors
  • Profiling Engine
  • Rule Engine
  • Dataset Review Engine
  • ML Readiness Score
  • Target Leakage Detection
  • Dataset Diff Engine
  • Target Column Concept
  • Mental Model & Workflow
  • Interpreting Findings
  • Workflow Cheat Sheet
  • Beginner Glossary

Python SDK

  • load()
  • profile()
  • analyze()
  • review()
  • diff()
  • score()
  • plan()
  • Dataset
  • Data Models
  • Profile Models
  • Rule & Finding Models
  • Review Models
  • Score Models
  • Leakage Models
  • Diff Models
  • Exceptions
  • Plugins

CLI Reference

  • analyze
  • review
  • diff
  • score
  • plan
  • Configuration

Guides

  • CI/CD Integration
  • Custom Rules
  • Writing Plugins

Resources

  • Release Notes
  • FAQ
  • Troubleshooting
HomeDocsfs.review()

Python SDK

fs.review()

SDK Reference: run a complete engineering review

python
1def review(
2 source: object,
3 *,
4 previous: object | None = None,
5 target_column: str | None = None,
6 enabled_reviewers: Sequence[str] | None = None,
7 enabled_categories: Sequence[ReviewCategory] | None = None,
8 reviewer_config: Mapping[str, Mapping[str, Any]] | None = None,
9 max_correlation_columns: int = 100,
10 max_frequency_table_size: int = 1000,
11) -> ReviewResult:

Overview

Performs a comprehensive engineering review of a dataset. It orchestrates a multi-stage pipeline: resolving inputs, constructing context, executing registered built-in reviewers in isolation, generating ranked recommendations via the centralized Recommendation Engine, and computing the deterministic ML Readiness Score. The review reuses computed rule findings and profiles under the hood so no raw data is re-read or re-profiled during reviewer dispatch.

When to Use It

Use in Python scripts, data ingestion pipelines, or notebooks to evaluate a dataset's readiness for ML modeling in a single call. It consolidates schema checks, data quality audits, and target leakage diagnostics into a single structured result.

Parameters

  • source: Dataset | str | DataFrame. The input dataset path (CSV, Parquet, Excel) or in-memory DataFrame (pandas, Polars).
  • previous: object | None (default None). Prior snapshot for diff-aware reviews. When provided, the DiffReviewer compares the current dataset against it and attaches the DatasetDiffResult to result.diff.
  • target_column: str | None (default None). Name of the target column. Highly recommended to enable target leakage checks.
  • enabled_reviewers: Sequence[str] | None (default None). Optional list of specific reviewer IDs to execute.
  • enabled_categories: Sequence[ReviewCategory] | None (default None). Optional list of reviewer categories to execute (schema, quality, leakage, diff, feature_quality, custom).
  • reviewer_config: Mapping[str, Mapping[str, Any]] | None (default None). Parameter overrides for specific reviewers (e.g. customized thresholds).
  • max_correlation_columns: int (default 100). Cap limit for correlation matrix computation during profiling.
  • max_frequency_table_size: int (default 1000). Frequency table storage cap.

Return Value

Returns a frozen ReviewResult dataclass containing:

  • engine_version: str representing the Review Engine result schema version (currently "0.4.0").
  • dataset_summary: DatasetSummary with row and column count descriptors.
  • generated_at: UTC timestamp.
  • sections: Sorted sequence of ReviewSection objects representing the active reviewers' sections (sorted from critical to passed).
  • recommendations: Flat, ranked, cross-section list of Recommendation objects generated by the centralized Recommendation Engine.
  • overall_summary: Concise plain-text roll-up.
  • score: An optional MLReadinessScore containing overall rating and per-dimension breakdown.
  • diff: DatasetDiffResult | None. When previous is provided, the DiffReviewer attaches the computed diff result; otherwise None.

SDK Example

python
1import featuresmith as fs
2
3result = fs.review(
4 "train.csv",
5 target_column="churn",
6 reviewer_config={
7 "review.quality.missingness": {"threshold": 25.0},
8 "review.quality.cardinality": {"threshold": 0.40}
9 }
10)
11
12# Output summary and score
13print(result.overall_summary)
14if result.score:
15 print(f"ML Readiness: {result.score.overall}/100")
16 for dim in result.score.dimensions:
17 print(f" {dim.label}: {dim.score}/100")

Rendering Review Output

The top-level featuresmith package re-exports fs.render() to generate formatted text reports:

python
1import featuresmith as fs
2
3result = fs.review("train.csv", target_column="churn")
4report_text = fs.render(result, target="console")
5print(report_text)

fs.render(result: ReviewResult, target: str = "console") -> str formats the review sections, severity badges, and score scorecard into plain text suitable for terminal output or logging.

Output Example

python
1# result.overall_summary
2'10 of 10 sections passed with 0 finding(s) identified across the review.'
3
4# result.score.overall
5100.0

Common Workflows

  • Continuous Integration Gates: Validate loaded files in pipeline tests and inspect findings programmatically to block merges when critical errors are uncovered.
  • Dataset Triage: Run a quick review over multiple candidate datasets to determine which has the highest data quality and lowest target leakage before selecting a source.

Notes and Limitations

  • Deterministic & Advisory: Recommendations are generated deterministically from computed findings and are purely advisory — nothing is auto-applied unless coded into your caller logic. Observability trend logs and HTML static reports are planned for future releases.

Related Documentation

See the CLI counterpart featuresmith review and the ML score reference fs.score().

Explore

  • Quick Start
  • Python SDK
  • CLI Reference
  • Examples
Featuresmith Icon
Featuresmith

Open-source data profiling and validation for Python engineers.

Documentation

  • Introduction
  • Quick Start
  • Python SDK
  • CLI Reference

Community

  • GitHub
  • Discussions
  • Issues
  • Contributing

Project

  • Roadmap
  • Release status
  • Benchmarks
  • Changelog
  • Examples

Legal

  • Apache 2.0 License
  • Code of Conduct
  • Security

© 2026 Featuresmith Contributors. Released under the Apache 2.0 License.

Built by Aditya Gangwani in the open.