Local Runs

This page guides you through running the SDGym benchmark locally for multi-table datsets. To run on the cloud, please see the guide for AWS Runs.

import sdgym

results_summary = sdgym.benchmark_multi_table(
    output_destination='my_sdgym_results/',
)

See Interpreting Results for a description of the benchmarking results.

Optional Parameters

Every step of the benchmarking process is customizable. Use the optional parameters to control the setup, execution and evaluation.

Setup

Use these parameters to control which synthesizers and datasets to include in the benchmark.

synthesizers: Control which synthesizers to use by supplying a list of strings with the synthesizer names

sdgym.benchmark_multi_table(
    synthesizers=['HMASynthesizer', 'HSASynthesizer'])
circle-check

custom_synthesizers: Supply your own custom synthesizers and variants using a list of classes.

sdv_datasets: Control which of the SDV demo datasets to use by supplying their names as a list of strings.

  • (default) ['NBA', 'financial', 'Student_loan', 'Biodegradability', 'fake_hotels', 'restbase', 'airbnb_simplified']

  • See Datasets for more options

additional_datasets_folder: You can also supply the name of a local folder containing your own datasets.

  • (default) None: Do not run the benchmark for any additional datasets.

  • <string>: The path to your folder that contains additional datasets. Make sure your datasets are in the correct format. Make sure your datasets are in the correct format as described in the Dataset Format guide.

Execution

Use these parameters to control speed and flow of the benchmarking.

limit_dataset_size: Set this boolean to limit the size of every dataset. This will yield faster results but may affect the overall quality.

  • (default) False: Use the full datasets for benchmarking.

  • True: Limit the dataset size before benchmarking. For every dataset selected, use only 1000 rows (randomly sampled from the table with the largest # of rows) and the first 10 columns. For multi-table datasets, the sample is guaranteed to have referential integrity.

timeout: The maximum number of seconds to give to each synthesizer to train and sample a dataset

  • (default) None: Do not set a maximum. Allow the synthesizer to take as long as it needs.

  • <integer>: Allow a synthesizer to run on the integer number of seconds for each dataset. If the synthesizer is exceeding the time, the benchmark will report a TimeoutError.

show_progress: Show the incremental progress of running the script

  • (default) False: Do not show the progress. Nothing will be printed on the screen.

  • True: Print a progress bar to indicate the completion of the benchmarking.

output_destination: The path to your local folder where you'd like to store the final results and detailed artifacts.

  • (default) None: Do not save any of the results.

  • <string>: Store the final results and any detailed artifacts created during the process. For more details on what will be saved, see the Results Summary and Artifacts guides.

circle-info

Are you running a benchmark regularly? We recommend writing to the same output_destination folder every time. Each benchmark run will be stored in a different folder, ready for you to explore and compare results. For more information, see the Artifacts guide.

Evaluation

Use the evaluation parameters to control what to measure when benchmarking.

circle-check

compute_diagnostic_score: Set this boolean to generate an overall diagnostic score for every synthesizer and dataset. This may increase the benchmarking time.

compute_quality_score: Set this boolean to generate an overall quality score for every synthesizer and dataset. This may increase the benchmarking time.

Last updated