Reporter YAML
The Reporter module is responsible for outputting experiment results and supports multiple report formats including data storage, evaluation reports, and timing records.
Usage Examples
Click the button below to run examples in Colab:
Note: If using Colab, please see the runtime setup guide.
Loader:
load_data:
filepath: benchmark://adult-income
schema: benchmark://adult-income_schema
Synthesizer:
synthesize:
method: default
Evaluator:
fidelity_check:
method: sdmetrics-qualityreport
Reporter:
save_synthetic:
method: save_data
source: Synthesizer
save_report:
method: save_report
granularity: global
save_schema:
method: save_schema
source:
- Loader
- Synthesizer
save_timing:
method: save_timingSupported Report Methods
This module supports the following report output methods. For detailed parameters, please refer to each subpage:
- Save Data - Save synthetic data or outputs from other modules as CSV files
- Generate Evaluation Reports - Generate evaluation result reports with multiple granularity levels
- Save Schema Information - Output data column schema information from specified modules
- Save Validation Results - Export Constrainer validation results as structured CSV reports
- Save Timing Information - Record execution time of each module
Naming Strategy and Experiment Names
PETsARD adopts a unified experiment naming convention for identifying and tracking experiment processes.
Naming Strategy Overview
The Reporter module supports two naming strategies, controlled via the naming_strategy parameter:
- TRADITIONAL: Maintains backward compatibility with traditional naming format
- COMPACT: Provides a more concise and readable naming format
Experiment Name Format
Experiment Tuple
full_expt_tuple is a tuple composed of module name and experiment name:
(module_name, experiment_name)This format is primarily used by the Reporter system to identify and organize experiment results.
Experiment String
full_expt_name concatenates the module name and experiment name with a hyphen:
{module_name}-{experiment_name}File Naming Format
save_data Method
| Strategy | Format | Example |
|---|---|---|
| Traditional | {output}_{module}[{experiment}].csv | petsard_Synthesizer[exp1].csv |
| Compact | {output}_{module}_{experiment}.csv | petsard_Synthesizer_exp1.csv |
save_report Method
| Strategy | Format | Example |
|---|---|---|
| Traditional | {output}_Reporter[{eval}_[{granularity}]].csv | petsard_Reporter[eval1_[global]].csv |
| Compact | {output}_{eval}_{granularity}.csv | petsard_eval1_global.csv |
save_timing Method
All strategies use the same format:
{output}_timing_report.csvModule Abbreviation Table (Compact Strategy)
| Module Name | Abbr. | Example Filename |
|---|---|---|
| Loader | Ld | petsard_Ld.load_adult.csv |
| Splitter | Sp | petsard_Sp.train_test.csv |
| Processor | Pr | petsard_Pr.normalize.csv |
| Synthesizer | Sy | petsard_Sy.ctgan_baseline.csv |
| Constrainer | Cn | petsard_Cn.privacy_check.csv |
| Evaluator | Ev | petsard_Ev.utility_eval.csv |
| Reporter | Rp | petsard_Rp.summary.csv |
Granularity Abbreviation Table (Compact Strategy)
| Granularity Name | Abbr. | Example Filename |
|---|---|---|
| global | G | petsard_eval_privacy.G.csv |
| columnwise | C | petsard_eval_column.C.csv |
| pairwise | P | petsard_eval_correlation.P.csv |
| details | D | petsard_eval_detailed.D.csv |
| tree | T | petsard_eval_hierarchical.T.csv |
Naming Recommendations
Module Names
- Use standard module names: ‘Synthesizer’, ‘Evaluator’, ‘Processor’, etc.
- Case sensitivity must match exactly
Experiment Names
- Use meaningful prefixes: ’exp’, ’eval’, ’test’, etc.
- Separate different parts with underscores: method name, parameter settings, etc.
- Use square brackets for evaluation levels: [global], [columnwise], [pairwise]
Parameter Encoding
- Use abbreviations for parameter names: method, batch, epoch, etc.
- Use concise representations for values: 300, 0.1, etc.
- Connect multiple parameters with underscores: method_a_batch500
Strategy Selection
- New Projects: Recommended to use
compactstrategy for more concise filenames - Existing Projects: Use
traditionalstrategy to maintain compatibility - File Management:
compactstrategy makes filenames easier to sort and categorize
- New Projects: Recommended to use
Common Parameters
All report methods support the following common parameters:
- output (
string, optional) - Output file name prefix, defaults topetsard - naming_strategy (
string, optional) - Filename naming strategy, choosetraditional(default) orcompact
Notes
- Reporter should be executed after all modules requiring reports have completed
- Files with the same name will be overwritten; use different
outputprefixes - All reports are saved in CSV format with UTF-8 encoding
- Recommended to use
compactnaming strategy for new projects; usetraditionalfor existing projects to ensure compatibility