pii_replay
pii_replay
¶
Classes:
| Name | Description |
|---|---|
PIIReplayData |
Per-column PII data listed in the PII Replay section of the SQS report. |
PIIReplay |
PII Replay metric -- counts PII values from the reference data appearing in the output. |
PIIReplayData
pydantic-model
¶
Bases: BaseModel
Per-column PII data listed in the PII Replay section of the SQS report.
Fields:
-
column_name(str) -
column_assigned_type(str) -
pii_type(str) -
total_ref_data(int) -
unique_ref_data(int) -
total_synth_data(int) -
unique_synth_data(int) -
unique_synth_data_percentage(float)
column_name
pydantic-field
¶
The name of the column with PII data.
column_assigned_type
pydantic-field
¶
The assigned type for the column (text, unique identifier, date, email, etc.).
pii_type = UNKNOWN_ENTITY
pydantic-field
¶
Type of the PII data in the column. For non-text fields, same as column_assigned_type. For text fields, the PII entities detected within the text (race, SSN, address, etc.).
total_ref_data = 0
pydantic-field
¶
Total rows in the reference data that contain PII values.
unique_ref_data = 0
pydantic-field
¶
Count of distinct PII values for this entity in the reference column.
total_synth_data = 0
pydantic-field
¶
Number of output rows whose column value matches a reference PII value.
unique_synth_data = 0
pydantic-field
¶
Count of distinct reference PII values that appear in the output column.
unique_synth_data_percentage = 0
pydantic-field
¶
Percentage of distinct reference PII values replayed in the output (unique_synth_data / unique_ref_data * 100).
PIIReplay
pydantic-model
¶
Bases: Component
PII Replay metric -- counts PII values from the reference data appearing in the output.
For each classified PII entity, reports total and unique replay counts. This component does not produce a numeric score; it surfaces PII leakage details for the HTML report.
Fields:
-
score(EvaluationScore) -
name(str) -
reference_total_records(int) -
output_total_records(int) -
pii_replay_data(list[PIIReplayData])
reference_total_records = 0
pydantic-field
¶
Total rows in the reference data.
output_total_records = 0
pydantic-field
¶
Total rows in the output data.
pii_replay_data = list()
pydantic-field
¶
Per-column / per-entity replay statistics.
jinja_context
cached
property
¶
Template context with PII replay statistics and entity type list.
from_evaluation_dataset(evaluation_dataset, config=None)
staticmethod
¶
Compute PII replay counts from classified entity metadata.