Repository navigation
Pointblank v1.3.0 is about the quality of the data used to train and evaluate models. The new pb.Ablation measures what each validation step is worth to a model: it retrains the model without the rows that a step flags and compares the result with dropping random rows. col_vals_scored() validates rows by their scores from embedding models, rerankers, classifiers and other models, and new text checks find low-quality text, near-duplicates, benchmark contamination, and personal information. check_splits() and check_synthetic() check dataset splits and synthetic data, and to_data_card() writes a dataset card backed by the validation. The release also makes the null checks treat NaN the same way on every backend and makes the code that to_code() and yaml_to_python() generate more reliable.
New Features
-
Data ablation —
pb.Ablationtrains your model on the table with each step's failing rows removed, then compares each version with removing the same number of random rows. It reports paired intervals with Holm-adjusted verdicts (helps, hurts or inconclusive). The strategies aredrop_each(),drop_steps(),drop_all(),drop_all_but_each()(what each step adds on top of the others), anddrop_groups(). There's also aplan()dry run, a compact report, andget_effects()andto_json()for the results. (#534, #535) -
Ablation for production pipelines — Ablations can be exported, trained elsewhere and read back with
export()andload_results(), which check fingerprints of the data and the plan. Results can be cached,run()can run versions in parallel withmax_workers=andexecutor=, andcheck_determinism()checks that the evaluation is reproducible.annotate()writes the results into the validation's step notes. An ablation can be defined in a YAMLablation:block and built withpb.yaml_ablation(). The newpointblank[ml]extra providespb.ablation.sklearn_evaluator(), a ready-made scikit-learn evaluate function. (#535) -
Ablation analyses —
sweep_score()andsweep_step()plot a dose-response curve over the cutoffs of a score or the values of a step's parameter.inject()measures what a defect costs the model, andsuggest_thresholds()turns that cost into step thresholds.shapley()andget_shapley()divide the effect of cleaning fairly among the steps.ci="bootstrap"gives bootstrap intervals,pass_as="row_index"givesevaluate=the kept row numbers instead of the table, andholdout=validates a holdout set with the same steps. (#536, #537, #540) -
Model-scored validation —
Validate.col_vals_scored()scores each row with a model and checks the score againstmin_val=andmax_val=. The scorer can be any function of a batch of rows, or one of the newpb.scorersadapters:embedding_similarity(),reranker(),classifier(),langid(),perplexity(),text_stat(), andtoken_count(). Each adapter imports its package only when it's first used. Scores are cached in memory or in an SQLite file that a later run can resume from, and they appear in extracts, step reports and row flags. (#536, #537) -
Text checks — New validation methods for text data:
col_vals_text_quality(): the Gopher heuristic quality filters.col_vals_in_language(): checks the language of the text.col_vals_token_len(): checks the length in tokens.col_vals_no_pii(): finds personal information.rows_near_distinct(): finds near-duplicate rows with MinHash.rows_not_contaminated(): finds text that overlaps with benchmark data.col_vals_chat_format(): finds malformed chat conversations.
-
RAG checks —
pb.rag.corpus_checks()andpb.rag.eval_checks()provide step bundles for retrieval corpora and their evaluation sets. (#538) -
Split checks —
pb.check_splits()checks the splits of a dataset. It finds rows that leak between splits (exact copies and, withnear=True, near-copies), labels that a split is missing or doesn't share with the training split, and distribution drift (PSI and KS) for each column. (#537) -
Synthetic-data checks —
pb.check_synthetic()compares synthetic data with the real data it was made from. It checks fidelity (the distribution and missing values of each column), diversity (repeated rows and distinct-n of text), and copies of seed rows. (#538) -
Data cards —
Validate.to_data_card()writes a Hugging Face dataset card or a datasheet, using the validation (and, optionally, an ablation) as evidence of the data's quality. (#538) -
Multi-judge prompts —
prompt()can use several LLM judges and combine their verdicts withaggregate=.calibrate_prompt()measures a step's agreement with human labels (Cohen's κ), and Cohere is a new provider. (#538) -
Per-segment quality scores —
get_dimension_scores(),get_health_score(),get_scorecard(), and their assertions takeby=, which breaks a score down by the values of a column. (#538) -
Row flags —
Validate.get_row_flags()returns the table with a pass/fail column for each row-level step, plus the number of steps each row failed and a weighted row score. Both it andget_sundered_data()takeduplicates=("keep_first","keep_last"or"flag_all") andduplicates_order_by=, sorows_distinct()steps can take part. (#533) -
Row-preserving preprocessing —
pb.row_preserving()marks apre=function as one that keeps the table's rows, so its step counts in row flags and sundering. Pointblank checks the function's output during interrogation. (#534)
Enhancements
- The reports for ablations, data cards, split checks and synthetic-data checks are localized into all 40 reporting languages. Numbers are formatted for the locale, and Arabic, Hebrew and Persian are laid out right-to-left.
lang=andlocale=are new arguments ofAblation.plan(),Ablation.get_tabular_report(),Validate.to_data_card(),SplitCheck.get_tabular_report()andSyntheticCheck.get_tabular_report(). (#541) columns_subset=inrows_distinct()androws_complete()now takes a column selector (e.g.,pb.starts_with("a")), in Python and in YAML. The selector is resolved during interrogation into a single step over the matched columns. Before, it raised anInvalidIntoExprError. (#559)- In action strings and briefs,
{col}for a step without a column now reads "all columns" or "the table", in the report's language.{value}now gives the step's main setting, such as the pattern ofcol_vals_regex(), instead of its internal settings. (#557)
Bug Fixes
col_vals_null(),col_vals_not_null(),rows_complete(), andcol_pct_null()now countNaNas missing on every backend, not just Pandas. (#553, thanks @DG47)specially()now counts rows with a null result as failing, son_passed + n_failedequalsn.col_vals_in_table()never counts a null orNaNkey as found, so it gives the same result on Pandas, Polars and DuckDB.schema_from_tbl()keeps the observed values of categorical columns named like a place or organization (e.g.,region,city) instead of assigning a preset. Thanks to @DG47. (#548)assert_passing()now raises anAssertionError(listing the steps that couldn't be evaluated) instead of aTypeErrorwhen a step is inactive or couldn't be evaluated. (#545)- The row-wise comparison methods (
col_vals_gt(),col_vals_between(), and others) now raise aTypeErrorwhen a step is defined withpb.ref(), pointing to the aggregate methods or tocol(). Before, the error only came at interrogation. (#545) yaml_to_python()now escapes strings, so values with quotes, regex backslashes (e.g.,\d,\b), or other special characters produce valid code that checks the same thing. (#558)to_code()andyaml_to_python()write infinite andNaNvalues asfloat("inf")andfloat("nan"). NumPy scalars are written as plain Python values and plain YAML numbers. (#554)yaml_to_python()now writes acol_schema_match()schema as apb.Schema()call, and a column selector in a YAMLpython:block is now passed to the step instead of being turned into a string. (#556)conjointlysteps now work inPipelineand in the code fromyaml_to_python(). (#555, #558)pb.scorers.classifier()now works with a plain function that takes only the texts. (#555)get_sundered_data(type="fail")no longer fails on PySpark when there are no row-level steps. (#533)Validate.set_tbl()no longer fails on interrogated PySpark validations. (#540)
Behavior Changes
rows_complete()steps now count when sundering, so rows with missing values go to the"fail"piece. (#533)- On Polars, PyArrow, and DuckDB, a
NaNin a float column now counts as missing in the four null checks above, which can change their counts. (#553) specially()steps that return nulls now report those rows as failing. (#548)
Documentation
- New User Guide pages: Scored Validation, Text Checks, RAG Checks, Data Ablation, Data Cards, Checking Splits, and Checking Synthetic Data. (#534, #536, #537, #538)
- The agent skills cover the new features, including a new "check-training-data" skill and references for ablation, scorers, and text/RAG checks. (#549)
- The README and the API reference were updated, including new examples for
SplitCheckandSyntheticCheck. (#550, #560)
Maintenance
- Python 3.13 is now listed in the package classifiers (it was already tested in CI). (#560)