Python SDK
Review Models
SDK Reference: review engine output objects
fs.review() composes the Profiling and Rule Engines into one structured review. It profiles once, computes rule findings once, then dispatches every enabled reviewer against that frozen context. The result is a single frozen ReviewResult.
ReviewResult
@dataclass(frozen=True, slots=True)class ReviewResult: engine_version: str # "0.4.0" dataset_summary: DatasetSummary generated_at: datetime # UTC sections: Sequence[ReviewSection] recommendations: Sequence[Recommendation] # ranked, cross-section fix list overall_summary: str score: MLReadinessScore | None diff: DatasetDiffResult | None = None # populated when previous snapshot provided def to_dict(self) -> dict[str, Any]: ...Sections are ordered from most severe (critical) to least (passed). score is populated by the review when at least one scoring dimension is applicable; otherwise it is None.
ReviewSection
@dataclass(frozen=True, slots=True)class ReviewSection: id: str title: str category: ReviewCategory severity: Severity findings: Sequence[RuleFinding] narrative: str | None = None recommendations: Sequence[Any] = () def to_dict(self) -> dict[str, Any]: ...The section severity is the highest severity among its findings, or PASSED when the section is clean.
ReviewCategory and Severity
class ReviewCategory(Enum): SCHEMA = "schema" QUALITY = "quality" LEAKAGE = "leakage" DIFF = "diff" FEATURE_QUALITY = "feature_quality" CUSTOM = "custom"class Severity(Enum): CRITICAL = "critical" WARNING = "warning" INFO = "info" PASSED = "passed"DIFF, FEATURE_QUALITY, and CUSTOM are reserved categories. The built-in reviewers currently emit schema, quality, leakage, and diff (when a previous snapshot is provided) sections; the FeatureQualityReviewer emits its findings under the quality category.
Built-in Reviewers
Ten reviewers ship out of the box. They are configurable via the reviewer_config argument of fs.review(), keyed by reviewer ID:
| Reviewer ID | Section | Category | Config Keys (defaults) |
|---|---|---|---|
| review.schema.health | Schema Health | schema | — |
| review.schema.types | Data Types | schema | identifier_min_count=10 |
| review.quality.missingness | Missing Values | quality | threshold=20.0 |
| review.quality.duplicates | Duplicate Rows | quality | threshold=10.0 |
| review.quality.constants | Constant Columns | quality | — |
| review.quality.cardinality | High Cardinality | quality | threshold=0.50, min_cardinality=20 |
| review.quality.basic_statistics | Basic Statistics | quality | skew_threshold=2.0, kurtosis_threshold=10.0 |
| review.leakage | Leakage Detection | leakage | detectors=None (built-in set) |
| review.diff | Dataset Diff | diff | requires previous snapshot |
| review.quality.feature_quality | Feature Quality | quality | variance_threshold=1e-10, correlation_threshold=0.95, min_target_correlation=0.05 |
The schema health reviewer surfaces fully empty columns (via FullyEmptyColumnsRule) plus structural warnings for empty datasets. The missingness reviewer intentionally excludes fully empty columns so each issue is reported exactly once. The data types reviewer flags numeric columns where every non-null value is distinct (identifier-like) and columns classified as free text. The feature quality reviewer flags near-constant numeric columns, highly correlated redundant column pairs, and low-signal high-cardinality columns. The leakage reviewer dispatches the pattern detectors documented on the Leakage Models page. The diff reviewer activates only when a previous snapshot is provided and compares the two profiles using the standalone Dataset Diff Engine.
Configuring Reviewers
import featuresmith as fsresult = fs.review( "train.csv", target_column="churn", reviewer_config={ "review.quality.missingness": {"threshold": 25.0}, "review.quality.cardinality": {"threshold": 0.40}, },)for section in result.sections: print(f"{section.severity.value.upper()} - {section.title}: {len(section.findings)} finding(s)")